• Advertisement

Archived

This topic is now archived and is closed to further replies.

Oval ball physics??

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Or any odd shaped object, what is the best way to go around solving the problem of an odd shaped object bouncing/changing angles and then coming to a stop by either rolling or by gentle rocking. Any help/advice/examples would be greatly appreciated.

Share this post


Link to post
Share on other sites
Advertisement
You can implement collision detection for such an object with the ground relatively easily, as with a simple matrix transform it''s a sphere, and sphere-plane collision detection is easy.

As for collision response, in general collision detection will give you a direction of impact not in line with the centre, and this will tend to both translate and rotate it. The translating effect will throw it back from the surface while the rotating effect will cause it to spin. These are both strightforward to calculate from standard formulae.

To get it to rock and roll you just need to do the above calculations often enough. E.g. if you drop such an object on the ground and after initially bouncing it slows down so it is just rolling/rocking the same calculations will still work as you can treat the rolling/rocking motion as a series of tiny pushes that together with gravity keep it moving. Done like this it never stops so you need to include a test for when it has slowed down enough to be stopped.

Share this post


Link to post
Share on other sites

  • Advertisement