Hi!
I have balls bouncing on a ground, when the ball hits the ground it should bounce up in the air with different angles. But I always want the time the balls are in the sky to be the same.
Therefore I need an equation how to shoot the balls in different angles but with the same time, eg. a parabolic motion equation.
My current code for shooting away the balls are like following. Where rThrow is the angle and -230 is the speed. How should I do to get the right speed for different angles?
local rThrow = math.random(40, 60)
ball:applyForce( rThrow, -230, ball.x, ball.y )
Best regards,
joelwe [import]uid: 54640 topic_id: 19318 reply_id: 319318[/import]