* Creates a new character controller. * * @param offset - The artificial gap added between the character’s chape and its environment.
(
offset: number,
)
| 414 | * @param offset - The artificial gap added between the character’s chape and its environment. |
| 415 | */ |
| 416 | public createCharacterController( |
| 417 | offset: number, |
| 418 | ): KinematicCharacterController { |
| 419 | let controller = new KinematicCharacterController( |
| 420 | offset, |
| 421 | this.integrationParameters, |
| 422 | this.broadPhase, |
| 423 | this.narrowPhase, |
| 424 | this.bodies, |
| 425 | this.colliders, |
| 426 | ); |
| 427 | this.characterControllers.add(controller); |
| 428 | return controller; |
| 429 | } |
| 430 | |
| 431 | /** |
| 432 | * Removes a character controller from this world. |