TerrainGrid collision

Good morning everyone.

I make a new post cause the other one wasn’t in the good category.

Ok, so I’ve got a little problem, I’d like to know how to make a TerrainGrid object solid.

By solid I mean that I’ll be able to place a character on it.

I tried multiple solutions like this one:


this.terrain = new TerrainGrid(“terrain”, 33, 129, new FractalTileLoader(ground, 256f));


this.terrain.setLocalTranslation(0, 0, 0);

this.terrain.setLocalScale(2f, 1f, 2f);

TerrainLodControl control = new TerrainGridLodControl(this.terrain, Oldera.getInstance().getCamera());

control.setLodCalculator(new DistanceLodCalculator(33, 10f)); // patch size, and a multiplier


CollisionShape terrainShape =

CollisionShapeFactory.createMeshShape((Node) terrain);

RigidBodyControl landscape = new RigidBodyControl(terrainShape, 0);




But my character falls through the terrain and stop at y=0;

So the CollisionShape is created but at y=0 and it is flat.

Thank you.

No double posting please: http://hub.jmonkeyengine.org/groups/terramonkey/forum/topic/terraingrid-collision-with-model/