summaryrefslogtreecommitdiff
path: root/WorldlineKeepers/Assets/Scripts/TestAABB.cs
diff options
context:
space:
mode:
Diffstat (limited to 'WorldlineKeepers/Assets/Scripts/TestAABB.cs')
-rw-r--r--WorldlineKeepers/Assets/Scripts/TestAABB.cs32
1 files changed, 32 insertions, 0 deletions
diff --git a/WorldlineKeepers/Assets/Scripts/TestAABB.cs b/WorldlineKeepers/Assets/Scripts/TestAABB.cs
new file mode 100644
index 0000000..ed33ab3
--- /dev/null
+++ b/WorldlineKeepers/Assets/Scripts/TestAABB.cs
@@ -0,0 +1,32 @@
+using System.Collections;
+using System.Collections.Generic;
+using Unity.VisualScripting;
+using UnityEngine;
+
+public class TestAABB : MonoBehaviour
+{
+
+ public Vector4 ray;
+
+ public Vector2 size;
+
+ private void Awake()
+ {
+
+ }
+
+ private void OnDrawGizmos()
+ {
+ if(PhysicsManager.RayVsBox(ray, new Vector4(transform.position.x, transform.position.y, size.x, size.y)))
+ {
+ Gizmos.color = Color.red;
+ }
+ else
+ {
+ Gizmos.color = Color.white;
+ }
+ Gizmos.DrawLine(ray.xy().ToVector3(), ray.xy().ToVector3() + ray.zw().ToVector3());
+ Gizmos.DrawCube(transform.position, size.ToVector3());
+ }
+
+}