Hi! I have a CharacterControl that uses a CapsuleCollisionShape… I can’t seem to get it to register a collision in my PhysicsCollisionEvent. Every other physics object in the scene shows up in my debug except the CharacterControl.
This is my PhysicsCollisionEvent, the player control never shows up in the logger:
[java]public void collision(PhysicsCollisionEvent event) {
if(event.getNodeA().getName() != null) {
logger.log(Level.INFO, event.getNodeA().getName());
}
if(event.getNodeB().getName() != null) {
logger.log(Level.INFO, event.getNodeB().getName());
}
}[/java]
This is my player creation:
[java]CapsuleCollisionShape capsuleShape = new CapsuleCollisionShape(1.5f, 3f, 1);
player = new CharacterControl(capsuleShape, 0.04f);
player.setJumpSpeed(10);
player.setFallSpeed(30);
player.setGravity(50);
player.setPhysicsLocation(new Vector3f(30, 4, 0));
getPhysicsSpace().add(player);[/java]
Thank you!