NPC Phycis problem

I have created NPC class extends Node.

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?

Sory for l8 answer but I didn’t have time to work with that.

  1. Yes, I can see same capsule as player, lying on the terrain (so i think it collide with terrain?)
  2. I didn’t set any vector but I think it’s going down.
  3. Also. It’s default.

But now got problem. Why player capsule didn’t collide with npc?

@Skatty said: But now got problem. Why player capsule didn't collide with npc?

Please see the big yellow note on this page: https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:walking_character

That says: “CharacterControl only collides with “real” PhysicsControls (RigidBody). It does not detect collisions with other CharacterControls!”