Spinning a ball

Hi,

I am working on a tennis type game, works well. Performs how I want. But I want to implement ball spinning into it.

I would like to know a way to make a ball spin or curve in the air as a tennis player would be able to do.

Any ideas?

Thanks,

Scott.

http://docs.unity3d.com/Documentation/ScriptReference/Rigidbody.html

You must not understand Rigidbodies as well as you think you do if that documentation doesn’t help you.

Could you help me out then? how would you curve a ball?

Thanks.

Add the appropriate force to make the ball curve. I suppose torque could be added as well to give a more realistic feel.

Will force and torque add a spin?
If not, maybe use transform.Rotate(Vector3.[left | right | up | down], [speed]); or something similar.
I wonder what the perf impact will be from adding the spin.

Simply put, current physics engines do not simulate air. If you want them to, you need to do some custom coding. That means you’ll need to understand the physics involved, and how the forces should be applied to the objects in question. And then, of course, you need to apply those forces.

Just applying force and torque is not going to spin the ball. If you want a curve ball kind of effect, you will have to write custom code. You should look into the “Magnus effect” and to simulate this effect in unity.

Not sure if this was resolved but one of the easiest ways I came up with was to rotate the ball along a global axis ( not the axis of the ball). So, its like instead of earth rotating around its own axis, its revolving around another point in space. This can create your spinning effect. Put a force along the direction the ball has to move on rigidbody and put a torque along a global axis.