- Home /
all...where can I put Transform.rotate(0,5,0);
all..ini monodevelop where can I put Transform.rotate(0,5,0); I want move a cube #pragma strict
function Start () {
}
function Update () { }
I recommend you to start with going through some tutorials to learn scripting with unity. This is a very basic functionality and explained pretty early on in most tutorials.
Thanks all for your help... gameVortex Reaper$$anonymous$$$$anonymous$$
Answer by ReaperMK · Mar 06, 2014 at 03:24 PM
If you want to perform a Y-Axis rotation on a cube you can create a new script: call it cubeController.
In the update section of the script add transform.rotate(0,rotateMod,0). You can define the rotateMod as a public int at the top of your script so that you can modify it during runtime (it will appear in the inspector/ otherwise just use 5). Once you have created this script and saved it you can drag the script onto the cube and the rotation will start upon running the unity player.
I would recommend checking out some beginning unity tutorials on youtube as it will be much more beneficial for you!
Good luck, and let me know if you have any additional questions.