Jump to content
  • Advertisement

Archived

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

tiutiu

Collision detection with ellipsoid

This topic is 5654 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

Finally i decided to use an ellipsoid for my character/world collision detection. I have the radius eRadius(x,y,z) of the ellipsoid. I translate all the map vertices to the vector space defined by eRadius (so, the model is bound to a sphere of radius 1). Collision works well, but the problem is implement gravity, i dont know how to do so. Model has vPosition, vVelocity and vRadius properties (all 3D vectors). BTW in the collision detection function i can save the floor position (polygon with normal(0,1,0) that is below sphere). How can i implement gravity? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Gravity (and other forces) can be represented simply as an acceleration vector, which you apply to your velocity vector once at the beginning of your collision/movement routine.

Here is a good article which may help you out...

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!