Jump to content
  • Advertisement
Sign in to follow this  
ProgrammingNerd

Collision problem

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

I'm trying to implement picking algorithm, and it succeeded. Until I started to shoot through hills, and hit something. I am using a simple heightmap for my terrain. My question is: do I have to employ a quadtree/octree scheme in order to not shoot through hills. I suspect that it would be too slow to perform a ray/terrain intersection test. If you need any code, let me know. Thanks in advance, ProgrammingNerd.

Share this post


Link to post
Share on other sites
Advertisement
To an extent...

Many games impliment this -- Each leaf in the quad tree that a ray goes through will be tested for collision. There is no way around it since in reality you cannot observe what you cannot see so in a game you want to employ the same idea.


A quad tree scheme would just speed up the collision process since you'll be testing leaves of triangles instead of the whole height map.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!