Skip to content

format

typescript
ControllerColliderHit.moveLength

class: ControllerColliderHit

description

(Read Only) The distance the character moved during the collision.

You can use this method to get the actual distance the character controller moved when colliding with an object, allowing you to perform operations such as collision detection and movement adjustments.

parameter

param_nametypedescription

reture

typedescription
numberThe distance moved during the collision.

code example