diff options
Diffstat (limited to '_Debug/REPL.cs')
-rw-r--r-- | _Debug/REPL.cs | 55 |
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); + }; + } + } |