Friday 8 April 2011

Unity Pivot Points



In normal 3D software, such as Cinema 4D you can alter the pivot, in which an object rotates around. I built a basic turret and I want the cylindrical gun to rotate around the sphere as if it were on a hinge in the centre of the sphere itself. When I rotate using the "pivot" setting in unity it rotates around the bottom of the whole object (fig.1), where the axes are (0 on the Y axis) and when I rotate the object using the "center" setting it rotates around the centre of the cylinder, rather than the end of it (fig.2).


fig.1


fig.2

Because I can't seem to find something in Unity, which allows me to alter the axes, I have created an empty game object and placed it where I want the pivot point to be and parented the cylinder to it, then instead of rotating the cylinder, I just rotate the object which works rather well (fig.3). It isn't the most convenient solution but it seems to work perfectly fine.

No comments:

Post a Comment