Ammo.js with Three.js

I quickly tried to implement it. It works, but the character only collides with dynamic objects.

In the video, the first (from the left) cube is kinematic, the second static and the third dynamic.
If I add gravity to the character, he falls through the ground, since it is static.

@extremety1989 & @yombo some ideas?

This is what the codes looks like.

public addCharacter() {
  const shape = new Ammo.btCapsuleShape(0.5, 0.5)

  const ghostObject = new Ammo.btPairCachingGhostObject()
  const transform = new Ammo.btTransform()
  transform.setIdentity()
  transform.setOrigin(new Ammo.btVector3(-5, 1, 0))
  transform.setRotation(new Ammo.btQuaternion(0, 0, 0, 1))
  ghostObject.setWorldTransform(transform)
  ghostObject.setCollisionShape(shape)
  ghostObject.setCollisionFlags(ghostObject.getCollisionFlags() | 16) //CHARACTER_OBJECT

  const controller = new Ammo.btKinematicCharacterController(ghostObject, shape, 0.35, 1)
  controller.setUseGhostSweepTest(true)

  controller.setGravity(0)
  // it falls through the ground if I apply gravity
  // controller.setGravity(-this.physicsWorld.getGravity().y())

  // move slowly to the right
  controller.setWalkDirection(new Ammo.btVector3(0.05, 0, 0))

  // addCollisionObject(collisionObject: Ammo.btCollisionObject, collisionFilterGroup?: number | undefined, collisionFilterMask?: number | undefined): void
  this.physicsWorld.addCollisionObject(ghostObject)
  this.physicsWorld.addAction(controller)
}