- Home /
Make a Cube Move, through rotation!
Hello there! I am having a little bit of trouble here on scripting a basic cube to move but simply by using rotation, without just moving the object itself. I have a gif below showing what I mean! Thanks! :)
Fake it. $$anonymous$$ake the cube, make a duplicate of it. Child the duplicate. Get rid of the mesh on the parent. Get rid of the collider on the child. $$anonymous$$ove the parent. Rotate the child.
Answer by abhi_360 · May 20, 2015 at 10:25 AM
Use this if u want it to rotate like in the gif
http://docs.unity3d.com/ScriptReference/Transform.Rotate.html
float speed=10; void Update() { transform.Rotate(vector3.right * speed); }
Your answer
![](https://koobas.hobune.stream/wayback/20220613200036im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Rotating a created mesh around it's pivot 2 Answers
Rotate a cube by 90 degree 1 Answer
Measure a rotating gameobject. 0 Answers