Currently, as displayed in the last two posted videos, the ground is represented by an infinite plane. The method used to produce this is extremely straightforward:
btCollisionShape* groundShape = new btStaticPlaneShape(btVector3(0,1,0),1);
Likewise, the ability to add a custom heightmap is a one-liner:
btHeightfieldTerrainShape (int heightStickWidth, int heightStickLength, void *heightfieldData, btScalar heightScale, btScalar minHeight, btScalar maxHeight, int upAxis, PHY_ScalarType heightDataType, bool flipQuadEdges);
The only problem is that I am not sure in what form the heightfieldData needs to be passed to the above constructor. Compounding the issue is that documentation is null, and there seems to be no information online regarding proper syntax.
Time for trial and error, I suppose.
No comments:
Post a Comment