Calculate how much spin a particle is given

This topic is 2834 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hey,
I have a particle (ball) and the user can hit the ball anywhere on its surface with a certain amount of power. How can I efficiently calculate how fast the ball will spin and in which direction? My first idea was to split the ball up into sections and depending on what section was hit (e.g. outer sections would cause the ball to spin more and inner ones would cause it to spin less), then create a coefficient with the relevant value and use that somehow, but I'm not sure if this is the best way of doing this.
thanks

Share on other sites
Are you trying to model physics for a ball? my suggestion is to apply some physics...calculate the inertia of the ball and apply torque to the ball. Is it 2d or 3d?

Share on other sites
Yes I am, but for a game so it doesn't have to be wholly accurate. The game is 3D.

Share on other sites
well, it's a lot more involved, at least you shold have a 3x3 matrix for inverse inertia tensor, inverse mass as float, position, angular velocity and linear velocity as vectors, rotation as qternion.
pick any integration method.
then make a function that applies force at specific point of the ball

Share on other sites
Thanks for the help. Do I need to dive that deep into it, even if It don't want to render the results? I need to perform the calculations in 3D, but won't be rendering them. I just need to know the rotation with respect to a given time.

1. 1
2. 2
3. 3
Rutin
22
4. 4
5. 5
khawk
14

• 9
• 11
• 11
• 23
• 10
• Forum Statistics

• Total Topics
633652
• Total Posts
3013137
×