v2 WORKING ROTATIONS
This commit is contained in:
+5
-8
@@ -34,13 +34,12 @@ public class Leg : MonoBehaviour {
|
||||
void Update()
|
||||
{
|
||||
foot.X = point.x;
|
||||
foot.Y = point.y * -1;
|
||||
//foot.Z = point.z * (invert ? -1 : 1);
|
||||
foot.Z = point.z * (invert ? 1 : -1);
|
||||
foot.Y = point.y;
|
||||
foot.Z = point.z;
|
||||
|
||||
foot.rotationX = rotation.x;
|
||||
foot.rotationY = rotation.y * (invert ? -1 : 1);
|
||||
foot.rotationZ = rotation.z * (invert ? -1 : 1);
|
||||
foot.rotationY = rotation.y;
|
||||
foot.rotationZ = rotation.z;
|
||||
|
||||
foot.translateX = translateX;
|
||||
foot.translateY = translateY;
|
||||
@@ -67,8 +66,6 @@ public class Leg : MonoBehaviour {
|
||||
Hip2.transform.localRotation = Quaternion.Euler((float)a2, 0, 0);
|
||||
Knie.transform.localRotation = Quaternion.Euler((float)a3, 0, 0);
|
||||
|
||||
pos = foot.pos;
|
||||
pos.x = pos.x * (invert ? 1 : -1);
|
||||
pointShouldBe.transform.localPosition = pos;
|
||||
pointShouldBe.transform.localPosition = foot.pos;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user