Terrain Collision Meshes in Bullet 2.74

Fish

22-04-2009 03:48:06

Heads-Up.

The Bullet developers changed the way terrain mesh positioning is calculated in 2.74. See btHeightfieldTerrainShape.h

So the OgreBullet Terrain demo no longer works as expected. I'd submit a patch but the new system isn't making sense to me yet.

-Fish

Fish

22-04-2009 05:03:24

Nevermind...I figured it out.

I think this should work in the demo. Just need to replace lines 212-215 in Terrain_Demo.cpp with:


Ogre::Vector3 terrainShiftPos( (terrainScale.x * (page_size - 1) / 2), \
(terrainScale.y * terrainScale.y / 2), \
(terrainScale.z * (page_size - 1) / 2));


I'll post a patch to SF later this week.