summaryrefslogtreecommitdiff
path: root/_Debug/REPL.cs
diff options
context:
space:
mode:
authorchai <215380520@qq.com>2024-03-15 21:03:07 +0800
committerchai <215380520@qq.com>2024-03-15 21:03:07 +0800
commit78304183fb59e243a2d6da4a00a4311ae21c9717 (patch)
treeaeae48561b9a5c25a1d58de28b8b3e2af37598e4 /_Debug/REPL.cs
parentdbba1ae118a70db8be668806c0af8655e7b4afe7 (diff)
*misc
Diffstat (limited to '_Debug/REPL.cs')
-rw-r--r--_Debug/REPL.cs55
1 files changed, 43 insertions, 12 deletions
diff --git a/_Debug/REPL.cs b/_Debug/REPL.cs
index 29209ef..8195a56 100644
--- a/_Debug/REPL.cs
+++ b/_Debug/REPL.cs
@@ -4,11 +4,15 @@ using UnityEngine;
class REPL
{
+ public static Transform footCenter;
+
public static void StartREPL()
{
+ AddHeightBox();
AddCamera();
AddRigidbodyDebug();
AddCubes();
+ AddFootCenter();
}
public static void AddCamera()
@@ -39,18 +43,18 @@ class REPL
public static void AddRigidbodyDebug()
{
string[] targets = {
- "Head",
- "Neck",
- "Torso",
- "Arm_Right",
- "Arm_Left",
- "Hand_Right",
- "Hand_Left",
- "Hip",
- "Leg_Left",
- "Leg_Right",
- "Foot_Left",
- "Foot_Right",
+ //"Head",
+ //"Neck",
+ //"Torso",
+ //"Arm_Right",
+ //"Arm_Left",
+ //"Hand_Right",
+ //"Hand_Left",
+ //"Hip",
+ //"Leg_Left",
+ //"Leg_Right",
+ //"Foot_Left",
+ //"Foot_Right",
"Knee_Left",
"Knee_Right",
};
@@ -121,4 +125,31 @@ class REPL
}
}
}
+
+ public static void AddHeightBox()
+ {
+ float height = 2;
+ GameObject cube = new GameObject();
+ cube.transform.position = new Vector3(4.39f, 31.397f + height / 2.0f, -9.96f);
+ var drb = cube.AddComponent<DebugRigidBody>();
+ drb.mode = DebugRigidBody.EMode.Cube;
+ drb.color = UnityEngine.Color.red;
+ drb.cubeLen = height;
+ }
+
+ public static void AddFootCenter()
+ {
+ float height = 2;
+ GameObject cube = new GameObject();
+ footCenter = cube.transform;
+ cube.transform.position = new Vector3(4.39f, 31.397f + height / 2.0f, -9.96f);
+ var drb = cube.AddComponent<DebugRigidBody>();
+ drb.mode = DebugRigidBody.EMode.Custom;
+ drb.color = UnityEngine.Color.white;
+ drb.cubeLen = 0.1f;
+ drb.customDraw = () => {
+ //Draw.Sphere(drb.transform.position, 0.05f);
+ };
+ }
+
}