Hi,
I have an object moving at a constant speed. To achieve that I use zero gravity, a body with 100% bounce and a force applied to that physics body.
[lua]
physics.setGravity(0, 0)
…
physics.addBody( ball.object, { density=0, friction=0, bounce=1, radius=ball.size } )
ball.object:applyForce( x, y, ball.object.x, ball.object.y )
[/lua]
After collision the speed stays the same and that’s great. But, I want to manually increase speed from time to time.
How can I do this? Can I get the current X and Y force applied to an moving object? Something like this?
[lua]
ball.object:applyForce( ball.object.currentForceX, ball.object.currentForceY, ball.object.x, ball.object.y )
[/lua]
Daniel