Hi,
i am trying to get the Ammo KinematicCharacterController to work with my Babylon Project.
I must do something wrong, because the KinematicCharacterController does not collide with other meshes in my scene. Here is a example where it should collide with the ground mesh: Ammo Kinematic Character Test
controller step height
and more importantly, I’ve added a call to controller.setUseGhostSweepTest and added flags combination to addCollisionObject to support for characters:
CharacterFilter = 32 and DefaultFilter = 1,StaticFilter = 2
From my experience, ammo character controler can be tricky to set up. If your use case can fit with simple sphere rigid body, I’d go for it. You might end up with slightly more code to handle jumps for example but it will be easier to maintain.
Great! I made some progress too. I added some Ammo extensions provided by Ammo.lab (MIT licence) that adds some math to handle things a bit easier.
So this is almost working perfect now. But the walkdirection is somehow calculated wrong. Actually its moving to the opposite direction. So far idk wh: https://playground.babylonjs.com/#Q3RVQC#19
This is really weird. It seems that the rotation is mirrored somehow. When i turn left it walks right. But this makes no sense since the box turns right.