Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


Fast terrain mesh collision detection


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 polyfrag   Crossbones+   -  Reputation: 1867

Like
0Likes
Like

Posted 14 May 2013 - 06:22 PM

I'm thinking if using a mesh instead of a heightmap for terrain because I can add detail where needed like mountains and add overarching ridges. How would I do fast collision detection with it, on the magnitude O(1) like a heightmap if possible? Also if you can advice about having a large terrain the size of a basin for a greater city region (I want to eventually make a city-building/RTS game).

Sponsor:

#2 polyfrag   Crossbones+   -  Reputation: 1867

Like
0Likes
Like

Posted 14 May 2013 - 06:32 PM

I need to have many, many units since this is going to be a city.

#3 slicer4ever   Crossbones+   -  Reputation: 3943

Like
1Likes
Like

Posted 14 May 2013 - 07:57 PM

you won't be able to get O(1) without using a uniform technique. you could use voxels, with marching cubes algo to smooth out the geometry. as voxels are partially an extension to the theory behind heightmaps(uniform grids).

with appropriate scene subdividing, and using things like k-trees, and AABB's for initial detection, you can quickly throw out many cases where collision does not occur very fast. from there you have to use refined techniques, such as OBB, or convex hulls for more refined collision detections, and then apply an appropriate reaction.

I'd recommend using an actual physics library such as bullet if your game is heavy on collision detection, and your looking for realistic physic results.

Edited by slicer4ever, 14 May 2013 - 07:58 PM.

Check out https://www.facebook.com/LiquidGames for some great games made by me on the Playstation Mobile market.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS