I'm pretty new to Corona and Lua as a language but I'm trying to make a start on my own game. However, I am running into an issue that I'm hoping one of you may have a solution to.
In my game, I have a ball that collides with a static object which is a paddle. I want the ball to rotate after it collides with the paddle and this works to an extent. I have set my balls bounce to 1 and set the paddle to 0 and I know that this keeps it bouncing to the same height each time. The problem really comes when I apply torque to the ball. When the ball hits the paddle I want the ball to bounce back up (as it does) and I also want it to rotate the image. However, I am finding with using the object:applyTorque my ball does spin as intended however each time it collides with my paddle it jumps higher and higher each time.
If anyone has any ideas of a way to stop this from happening, or if I should be using a different function please let me know.
Thanks for taking the time to read this