Level Collision

Boogy

24-03-2010 22:55:47

How can you do collision with a level that has some sort of bumped terrain like this:

Close-up


Currently I have a box under the level that keeps the car some sort of above the terrain but thats not what I want.
I thought of exporting every object separately and create a bounding box for it but that only fixes the problem that you collided with the trees and stones.
Is it possible to create some sort of polygon collision with the terrain ? or is that a bit too 'expensive' to do.

Fish

26-03-2010 11:11:47

Yes, look at the sample application that comes with OB. You'll be interested in the file Terrain_Demo.cpp, specifically lines 154 - 204. That code creates a terrain collision mesh from a height map.

-Fish