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
+7 -7
View File
@@ -25,34 +25,34 @@ public class RotationControl : MonoBehaviour
// Update is called once per frame
void Update()
{
/*if (!dir2 && rotation.x < max)
if (!dir2 && rotation.x < max)
rotation.x += speed2;
else if (!dir2)
dir2 = !dir2;
else if (dir2 && rotation.x > min)
rotation.x -= speed2;
else if (dir2)
dir2 = !dir2;*/
dir2 = !dir2;
/*if (!dir3 && rotation.y < max)
if (!dir3 && rotation.y < max)
rotation.y += speed3;
else if (!dir3)
dir3 = !dir3;
else if (dir3 && rotation.y > min)
rotation.y -= speed3;
else if (dir3)
dir3 = !dir3;*/
dir3 = !dir3;
/*if (!dir && rotation.z < max)
if (!dir && rotation.z < max)
rotation.z += speed;
else if (!dir)
dir = !dir;
else if (dir && rotation.z > min)
rotation.z -= speed;
else if (dir)
dir = !dir;*/
dir = !dir;
body.transform.eulerAngles = new Vector3(rotation.x*-1, rotation.y, rotation.z);
body.transform.eulerAngles = new Vector3(rotation.x*-1, rotation.y*-1, rotation.z*-1);
for (int index = 0; index < rotation2.Count; ++index)
{