moveLength
How far the character has travelled until it hit the collider.
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.PhysicsModule
public float moveLength { get; }
Remarks
Note that this can be different from what you pass to CharacterController.Move, because the initial movement vector is decomposed into a set of movements, according to _stepOffset.
Additional Resources: _moveDirection
Examples
using UnityEngine;public class ExampleClass : MonoBehaviour{ void OnControllerColliderHit(ControllerColliderHit hit) { Debug.Log(hit.moveLength); }}