public static TransformState Lerp(TransformState a, TransformState b, float t) { return(new TransformState { Position = Vector3.Lerp(a.Position, b.Position, t), Rotation = Quaternion.Slerp(a.Rotation, b.Rotation, t), Scale = Vector3.Lerp(a.Scale, b.Scale, t) }); }
public static void Apply(this Transform transform, TransformState state) { transform.position = state.Position; transform.rotation = state.Rotation; transform.localScale = state.Scale; }