NavMesh help

Hi again all,



I’ve been playing with the NavMesh generator plugin from the SceneComposer with the pathfinding from MonkeyZone. I noticed something strange. I can get both the pathfinding and navmesh to work, but if I scale the level the navmesh is attached to, the navmesh won’t scale with it. Here is my code:



[java]sceneModel = (Node) assetManager.loadModel(“Models/Town/main.j3o”);

//sceneModel.scale(2f);



mesh = (Geometry) sceneModel.getChild(“NavMesh”);

//I’ve tried both setLocalScale() and scale() here with the same results.

mesh.scale(2f);

Mesh m = mesh.getMesh();



navMesh.loadFromMesh(m);

System.out.println(“NAV MESH ADDEDn”);

sceneModel.detachChild(mesh);



// We set up collision detection for the scene by creating a

// compound collision shape and a static RigidBodyControl with mass zero.

CollisionShape sceneShape =

CollisionShapeFactory.createMeshShape((Node) sceneModel);

landscape = new RigidBodyControl(sceneShape, 0);



landscape.setCollisionGroup(2);

landscape.removeCollideWithGroup(1);

sceneModel.addControl(landscape);[/java]



Of course, I attached the mesh geometry so I could see it after I created the collision shape. If I’m not being clear enough in what I’m describing I can post some pictures. Anyone know?