summaryrefslogtreecommitdiff
path: root/SurvivalTest/Assets/Scripts/Test/TestSnapAngle.cs
diff options
context:
space:
mode:
Diffstat (limited to 'SurvivalTest/Assets/Scripts/Test/TestSnapAngle.cs')
-rw-r--r--SurvivalTest/Assets/Scripts/Test/TestSnapAngle.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/SurvivalTest/Assets/Scripts/Test/TestSnapAngle.cs b/SurvivalTest/Assets/Scripts/Test/TestSnapAngle.cs
new file mode 100644
index 0000000..b00f24d
--- /dev/null
+++ b/SurvivalTest/Assets/Scripts/Test/TestSnapAngle.cs
@@ -0,0 +1,18 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class TestSnapAngle : MonoBehaviour
+{
+
+ public int m_Count = 16;
+
+ [Range(0, 15)]
+ public int m_Angle;
+
+ public void Update()
+ {
+ transform.rotation = Quaternion.Euler(0,m_Angle * 360f/ m_Count, 0);
+ }
+
+}