aboutsummaryrefslogtreecommitdiff
path: root/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests')
-rw-r--r--JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs18
-rw-r--r--JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs.meta11
2 files changed, 29 insertions, 0 deletions
diff --git a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs b/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs
new file mode 100644
index 0000000..3bf706a
--- /dev/null
+++ b/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs
@@ -0,0 +1,18 @@
+using UnityEngine;
+
+/// <summary>
+/// Use this component with a game object for demonstration purposes.
+/// </summary>
+[DisallowMultipleComponent]
+[RequireComponent(typeof(InterpolationObjectController))]
+public class TestMotion : MonoBehaviour
+{
+ [SerializeField]
+ private float _speed = 2f;
+
+ private void FixedUpdate()
+ {
+ transform.position += Vector3.right * _speed * Time.fixedDeltaTime;
+ transform.rotation = Quaternion.Euler(transform.rotation.eulerAngles.x, transform.rotation.eulerAngles.y + _speed * 30 * Time.fixedDeltaTime, transform.rotation.eulerAngles.z);
+ }
+}
diff --git a/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs.meta b/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs.meta
new file mode 100644
index 0000000..fe06ffe
--- /dev/null
+++ b/JamHelper/Assets/JamUtils/Scripts/Smooth-Motion-in-Unity/Tests/TestMotion.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 80afb4adbb1d67247ac41a23d04b67d7
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant: