diff options
Diffstat (limited to 'FollowTransformVelocity.cs')
-rw-r--r-- | FollowTransformVelocity.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/FollowTransformVelocity.cs b/FollowTransformVelocity.cs new file mode 100644 index 0000000..584846c --- /dev/null +++ b/FollowTransformVelocity.cs @@ -0,0 +1,16 @@ +using UnityEngine; + +public class FollowTransformVelocity : MonoBehaviour +{ + public TransformVelocity transformVelocty; + + private void Start() + { + } + + private void FixedUpdate() + { + base.transform.position = transformVelocty.transform.position + transformVelocty.velocity * 5f; + base.transform.rotation = transformVelocty.transform.rotation; + } +} |