Skip to main content

character_controller_offset

For performance and numerical stability reasons, the character controller will attempt to preserve a small gap between the character shape and the environment. This small gap is named offset and acts as a small margin around the character shape. A good value for this offset is something sufficiently small to make the gap unnoticeable, but sufficiently large to avoid numerical issues (if the character seems to get stuck inexplicably, try increasing the offset).

character offset

// Here the character controller is initialized with an offset of 0.01.
let offset = 0.01;
let characterController = world.createCharacterController(0.01);
warning

It is not recommended to change the offset after the creation of the character controller.