Function createPhysicsCharacterController
-
createPhysicsCharacterController(
world: PhysicsWorld,
position: Vec3,
options: PhysicsCharacterControllerOptions,
): PhysicsCharacterControllerParameters
- world: PhysicsWorld
The physics world to add the character to.
- position: Vec3
Initial world-space position of the character.
- options: PhysicsCharacterControllerOptions
Capsule dimensions.
Returns PhysicsCharacterController
The character controller instance.
- world: PhysicsWorld
Create a Havok physics character controller.
The controller adds a kinematic capsule body to
worldand resolves collisions by sweeping that capsule each step. Drive it from a per-physics-step callback (e.g.onPhysicsAfterStep) by calling PhysicsCharacterController.moveWithCollisions with the desired displacement, then read PhysicsCharacterController.getPosition to update your display mesh.