- Home /
The Physics of Ball Spin in Tennis, Topspin and Backspin
How to make realistic physics of ball spin in a tennis game with unity's physX engine?
As we know in real world a top spinning ball travels towards a player after bouncing, while a backspin/slice has more fraction after bouncing. Is there a way to simulate natural ball spin?
Please help!
Thanks,
Answer by ActionScripter · Jun 04, 2012 at 03:23 PM
Yes, Unity's physics engine will simulate realistic bounce reactions when a ball has spin. I confirmed this in a tennis project recently. As long as you have some friction in the physics materials for the balls and the ground plane, the balls will react appropriately upon contact with the ground. With enough backspin, they'll even reverse direction for the rebound.
If you want to force this behavior, apply a torque to the ball's rigidbody.
For in-flight spin effects, there doesn't seem to be anything in the default behavior. If you want to simulate a curveball effect due to midair spin, you'll have to calculate an extra force and add it to the rigidbody yourself.
Answer by Berenger · Mar 25, 2012 at 09:33 PM
I don't think the rotation of the rigidbody affect the trajectory, so you should use a constant force. The direction of which could be found with the ball's axis of rotation I guess. The intensity would be how much spin there is, obviously.
Answer by gs865 · Dec 08, 2013 at 06:56 PM
What you need to take into account is the Magnus Effect: http://www.youtube.com/watch?v=23f1jvGUWJs
Basically, it is a force that is applied to the ball, or any other spinning object and does affect its trajectory. This is behind tennis players' and golfers' spins.