Hello,
I have an animated character that would collide some objects (cubes), all work fine when KinematicRagdollControl is added to model, but I have a problem when I want to use only a few bones (ragdoll.addBoneName(“bone1”); ragdoll.addBoneName(“bone2”) - there is not collision. cubes does not move and model pass through them.
Help please my code:
[java]
model = (Node)assetManager.loadModel(“Models/myModel.j3o”);
ragdoll = new KinematicRagdollControl(0.5);
///Start 1st problem
ragdoll.addBoneName(“B12.L”); ///First problem
ragdoll.addBoneName(“B12.R”);
//////////
model.addControl(ragdoll);
bulletAppState.getPhysicsSpace().add(ragdoll);
///Second problem
ragdoll.addCollisionListener(this); ///Second problem
/////My cubes are
cubeGeometry.addControl(new RigidBodyControl(2);
public void collide(Bone bone, PhysicsCollisionObject object, PhysicsCollisionEvent event) {
if(object.getUserObject() != null & object.getUserObject instanceof Geometry){
fpsText.setText("Collision done!"); ////Never sown
}
[/java]