protected override void Move3D(ACharacterSystem3D cs, MotionInformation mi) { var correctAmountOfAngularSpeed = cs.LocomotionProfile.LerpAngularSpeed(Mathf.Abs(mi.Input.MovementDirection.z)); if (mi.Configuration.ShouldAdaptToNavMesh) { mi.Input.MovementDirection = cs.transform.InverseTransformDirection(mi.Input.MovementDirection); } cs.transform.Rotate(0f, mi.Input.MovementDirection.x * correctAmountOfAngularSpeed * Time.fixedDeltaTime, 0f, Space.Self); cs.transform.Translate(0f, 0f, mi.Input.MovementDirection.z * cs.LocomotionProfile.WalkSpeed * Time.fixedDeltaTime, Space.Self); }
protected override void Move3D(ACharacterSystem3D cs, MotionInformation mi) { }
/// <summary> /// Callback to verify if the condition is complete for the 3D space /// </summary> protected abstract bool IsComplete3D(ACharacterSystem3D cs, MotionInformation mi);
/// <summary> /// Callback to execute the movemement of the motion state in 3D space /// </summary> protected abstract void Move3D(ACharacterSystem3D cs, MotionInformation mi);
protected override bool IsComplete3D(ACharacterSystem3D cs, MotionInformation mi) { return(mi.Input.MovementDirection.x != 0f || mi.Input.MovementDirection.y != 0f || mi.Input.MovementDirection.z != 0f); }