protected override void Apply(Transform target, Quaternion value, MoveAlongPath movingObject) { if (_space == RotationSpace.Path) { if (_orientation == RotationOrientation.ForwardTangent) { value = Quaternion.LookRotation( path.GetTangent(movingObject.location, Space.Self), value * Vector3.up); } else if (_orientation == RotationOrientation.BackTangent) { value = Quaternion.LookRotation( -path.GetTangent(movingObject.location, Space.Self), value * Vector3.up); } value = path.TransformRotation(value); } else { if (_orientation == RotationOrientation.ForwardTangent) { value = Quaternion.LookRotation( path.GetTangent(movingObject.location), value * Vector3.up); } else if (_orientation == RotationOrientation.BackTangent) { value = Quaternion.LookRotation( -path.GetTangent(movingObject.location), value * Vector3.up); } } target.rotation = value; }
protected override void Apply(MoveAlongPathWithSpeed target, float value, MoveAlongPath movingObject) { target.speed = value; }
/// <summary> /// 更新移动对象, 由 MoveAlongPath 调用 /// </summary> public abstract void UpdateMovingObject(KeyframeListTargetComponentPair pair, MoveAlongPath movingObject);
protected override void Apply(Camera target, float value, MoveAlongPath movingObject) { target.fieldOfView = value; }