Advertisement Jump to content


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


Collision with the world

This topic is 5887 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
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.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!