- Home /
spin only on one axis
I made a turret that made from many parts. each part need to turn around only on one axis. I know how to make it aim one me but I don't know how to make it spin only around one axis (spin only around the Y axis or the x).
Sorry for poor english.
Comment
Best Answer
Wiki
Answer by Manco Capac · Dec 22, 2012 at 12:29 PM
What's a turret? I thought it was part of a castle :/
If there are many parts, break it into different objects, then assign a script for each one (if the objects need to rotate in different axes):
function Update () {
transform.Rotate(Vector3(0,0,0));
}
Change the 0s to the amount u want.