Any idea how to do a "Paper Toss" style behavior?
I'm struggling to think about how to do a papertoss style game...
Would I use magnitude or what? How could I get it so that the paper flies away from the lower/middle portion of the screen with the "finger-flick" and the speed/power is determined by the velocity of the flick? Also, the angle of trajectory would be determined by the starting X/Y and ending X/Y, which I'm assuming would be slightly easier (I have an idea in my head how to do this).
I'm assuming 4 real attributes to start;
StartX, StartY and EndX, EndY?
Is there a way to determine the velocity of a "finger-flick"?
Would I use magnitude or what? How could I get it so that the paper flies away from the lower/middle portion of the screen with the "finger-flick" and the speed/power is determined by the velocity of the flick? Also, the angle of trajectory would be determined by the starting X/Y and ending X/Y, which I'm assuming would be slightly easier (I have an idea in my head how to do this).
I'm assuming 4 real attributes to start;
StartX, StartY and EndX, EndY?
Is there a way to determine the velocity of a "finger-flick"?
Comments
Steve
edit: its still on the first page actually:
http://gamesalad.com/forums/topic.php?id=24236
$15 not bad - would save a lot of hassle id imagine
But I agree $15 is a steal...
...
@Steverd
some thing along the lines of what t-shirt has said above will sort out your flick action..
essentially... you need the position X and Y when touch is pressed, and again when it is released... then put those values into 'Vector to angle' and bobs you uncle...you have the angle that you've flicked at...
It should have an answer to my question, along with, "Oh, BTW, here is a template for sale on this very issue..."
speed magnitude(self.position.Y,mouse.positionY)*3
I've never used it myself, so not sure it knows how fast you've done the swipe?, I guess its working on a longer swipe on the screen being faster than a shorter one.
Any luck?,
if not, let us know and I'm sure one of us can figure it out....
a. you dont know there is a template
b. i know there is a template but dont know the answer to your question but know the template will solve your problem
So rather than answering and posting, i now just have to ignore it and not comment?
But I'm not sure how to detect how fast it took the player to "flick" from point A to point B.
I guess a reworking of the accelerate to mouse demo might work, if its setup to work only whilst touch is pressed, then when its released have it continue at its own velocity...
http://gamesalad.com/game/3203
??
The problem that I'm having now is that I can't seem to find out how to determine the player's "flick-velocity."
I have a starting x,y and an ending x,y which will give me the trajectory/angle of too. But I don't know how to get the "throw" velocity correct.
I may start a new thread for that topic...
I think this way gives the player a greater sense of control and ability with the game. If it's based on how far the player drags their finger then it doesn't work as well (in my opinion).