Code: Select all
btCollisionShape *heightShape = new btHeightfieldTerrainShape(width, length, mTerrain->GetHeightTable(),
1.f, mTerrain->GetMinHeight(), mTerrain->GetMaxHeight(), 1, PHY_FLOAT, flipQuadEdges);
Then I know i need to rotate -90 degrees whenever i render my terrain so it gets oriented properly with Bullet's terrain shape.
But I did find out about something. You would see on my right screen shot, when my generated terrain height goes down, Bullet terrain shape seems to go up. This happens along the edges.
The black color is bullet's terrain shape.
Thanks in advance for any ideas on how to make sure they align properly.