v2 WORKING ROTATIONS

This commit is contained in:
2018-11-10 23:23:03 +01:00
parent b41db01a55
commit cbe7b00b3a
7 changed files with 110 additions and 44 deletions
+5 -8
View File
@@ -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;
}
}