/// <summary>Find the world position of the ground below the character</summary> protected override void UpdateMovementPlane() { // Construct a new movement plane which has new normal // but is otherwise as similar to the previous plane as possible var normal = InterpolateNormal(lastRaycastHit); var fwd = Vector3.Cross(movementPlane.rotation * Vector3.right, normal); movementPlane = new Util.SimpleMovementPlane(Quaternion.LookRotation(fwd, normal)); rvoController.movementPlane = movementPlane; }
protected override void Start() { base.Start(); movementPlane = new Util.SimpleMovementPlane(rotation); }