In GameState I create NPC and call NPC.createNPC method:
[java]CapsuleCollisionShape capsuleShape = new CapsuleCollisionShape(0.5f, 2f, 1);
npcCtrl = new CharacterControl(capsuleShape, 0.05f);
npcCtrl.setJumpSpeed(20);
npcCtrl.setFallSpeed(45);
npcCtrl.setGravity(50);
npcCtrl.setPhysicsLocation(coords);
model.addControl(npcCtrl);
npcList.add(npc);
gs.getBulletAppState().getPhysicsSpace().add(npcCtrl);[/java]
As you can see I add collision shape to model and later to bulletappstate from GameState. In the same way my Player class is working but when I call [java] rootNode.attachChild(npc.getModel());[/java] only the model is added at 0,0,0 and it even doesn’t fall on the ground.
Extending the Node class is discouraged, though I don’t think it would cause the issue you’re seeing.
Three questions:
(1) Can you see the capsule when you enable physics debugging?
(2) What’s the gravity vector of your physics space?
(3) What’s the speed of your bullet appstate?