Fast terrain mesh collision detection

Started by
1 comment, last by slicer4ever 10 years, 11 months ago
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).
Advertisement
I need to have many, many units since this is going to be a city.
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.
Check out https://www.facebook.com/LiquidGames for some great games made by me on the Playstation Mobile market.

This topic is closed to new replies.

Advertisement