I have a physics mesh which I add to the scene as follows:
[java]
Spatial sceneModel = assetManager.loadModel(objectPath);
CollisionShape sceneShape = CollisionShapeFactory.createMeshShape(sceneModel);
RigidBodyControl rbc = new RigidBodyControl(sceneShape, 0);
sceneModel.addControl(rbc);
sceneModel.scale(scaleFactor);
bulletAppState.getPhysicsSpace().add(sceneModel);
rootNode.attachChild(object);[/java]
When I put a character or cube in the scene everything looks ok, untill the floor gets a bit higher, or if walls are encountered.
Hi, i have a similar problem, I’ve created a box moviment, but the physics doesn’t update, I don’t know how i can update the physics after the moviment.
@goltara said:
Hi, i have a similar problem, I've created a box moviment, but the physics doesn't update, I don't know how i can update the physics after the moviment.
Physics should move the spatial, notthe other way around.