- Home /
why is my object's rotation affecting it's position?
Hi, I just recently started playing around with Unity3D and am loving it so far. I come from an 3D Illustration and VFX background so I'm quick to get used to Unity's interface and functions. But one weird thing I noticed while trying to write a simple script for rotating my camera around a target/null (an empty game object that is the parent of the main camera (kindof using them the same way I use Null objects in Lightwave). Anyways... I noticed that when rotating on the X axis, the null/parent object was also sliding it's position, thus kindof ruining the effect I was going for. On further examination I found out that even without any components and scripts except for the transform component it, I noticed that when tweaking the rotation value in the inspector panel, I could see is sliding in the scene-view (but inspector showed no change in the translate values). Then again if I use the rotate tool (clicking and dragging tha handles in scene-view) the object stayed in place and only rotated around itself, but in the inspector panel I could see it adding positional values like it was interactively fixing itself in place.
I'm thinking there must be a logical reason why this is happening, but as it is I just can't see what I'm doing wrong, can anyone explain what I'm doing/thinking wrong?
cheers. Artgoblin
ok... tried creating a brand new box from unity and this rotation/position relation isn't wierd on the box. But when rotating an externally created house object this is still a problem
seems to be a problem with the imported mesh, wich is in *.obj format
Answer by jtbentley · Aug 30, 2010 at 02:59 PM
The object's pivot point is off center from where you think it is.
Your answer
Follow this Question
Related Questions
Floating-point errors while assigning transforms 1 Answer
postion scale and rotation greyed out and not working 1 Answer
transform position and rotation of instantiated object 1 Answer
An Efficient Way To Follow Transform's Position? 3 Answers
Following another object's position/rotation like parent/child relationship? 4 Answers