Beispiel #1
0
 public void TeleportToTarget()
 {
     if (followTarget == null)
     {
         return;
     }
     TeleportTo(followTarget.transform.position, followTarget.GetRotation());
 }
Beispiel #2
0
        public void LoadSnapshot(float snapshotBlend, bool useFollowTarget)
        {
            RagdollTransform element = useFollowTarget && followTarget != null ? followTarget : this;

            TeleportTo(
                Vector3.Lerp(element.transform.position, snapshotPosition, snapshotBlend),
                Quaternion.Slerp(element.GetRotation(), snapshotRotation, snapshotBlend)
                );
        }