Page 1 of 1

How to remove unnecessary angular velocities/moments?

Posted: Mon Feb 10, 2014 10:25 pm
by DreamWeaver
Hello,

In my example there is a Ball which rolls on the ground, hitting different obstacles.
Usually after a strong collision it spins very fast around some axis.

Because of this strong rotation the ball movement is not linear (after collision it moves linear few seconds, but then turns in some unpredictable direction).
I played around with "AngularDamping" property. If it is set to a value around "1" then it solves the problem. But this solution doesn't suit me, because the Ball stops very fast (but it should rolls further).

Any ideas how to solve this?
I need the following: a ball should rolls freely long time on the surface; after strong collision the ball should just change it's direction once (at the moment of collision) and it should rolls straight to the next obstacle.

Thanks.

Re: How to remove unnecessary angular velocities/moments?

Posted: Mon Feb 10, 2014 11:01 pm
by Norbo
Try setting the ball's LocalInertiaTensorInverse to all zeroes. The ball will no longer be able to rotate due to having effectively infinite rotational mass. This is a bit like setting AngularDamping to 1, except it totally disallows rotation.

Friction will need to be tuned down to allow it to slide more easily.

Since it isn't rotating at all anymore, any graphical appearance of rotation will need to be faked.

Re: How to remove unnecessary angular velocities/moments?

Posted: Sun Feb 16, 2014 11:45 pm
by DreamWeaver
Thanks a lot. It works awesome.