Jump to content
  • Advertisement

Archived

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

ironballs

Collision with the world

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

Is there an optimised or general way of detecting collisions of models (say characters), with the world mesh (i.e. the terrain?) It''s an area that obviously always creates collisions, are there any good methods, or ways of avoiding collision detection here? Cheers Matt

Share this post


Link to post
Share on other sites
Advertisement
I would personally do it as follows, but I have never implemented such a system. Have a variable that represents the "height" of the character, specifically the distance from the bottom of the character to the zero reference of the character. When a character is standing, this might be 1 m, when running .8, and when crouching .3 m, something like that. When the character is definitely in contact with some polygon, I would look of the height of the terrain or level at the x and y coordinates of the character, add his "height" to it, and then place the center of the character at that point. Problem: if you have extremely large triangles for large flat areas, you have to compute heights within the triangle, which may not be advantageous for you to do.... thats what I can think of for now. Hope it helps.
Brendan

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!