- Home /
rotate and translate
I have a cube that I wish to rotate along its Y axis a random amount from -180 to 180 (to make its Z face a new direction) and then translate it along it's Z axis (Vector3.forward). When I try this, however, I have discovered that its world axis and local axis are misaligned and I get skewed movement. Can someone suggest a practical way to go about this, maybe put up some code? I appreciate it thank you. Some additional info
Hierarchy: [Spawner(empty gameobject)- spawner script ] +[CubeType(clone) - Instantiated Prefab, Cube, RandomMove Script, DestroyONColl script] +[CubeType - Mesh Renderer, Animation, ChangeMat script]
Your answer
Follow this Question
Related Questions
Translate or Rotate a texture of a cube 2 Answers
Rotating a cube changes its local forward? 1 Answer
Rotating Player Controller locally or globally. 0 Answers
Rotate particles around player while moving up 1 Answer
Translate not working properly 1 Answer