x


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

more ▼

asked Aug 29 '10 at 01:52 PM

Artgoblin gravatar image

Artgoblin
1 1 1 1

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

Aug 29 '10 at 02:17 PM Artgoblin

seems to be a problem with the imported mesh, wich is in *.obj format

Aug 29 '10 at 02:32 PM Artgoblin
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

The object's pivot point is off center from where you think it is.

more ▼

answered Aug 30 '10 at 02:59 PM

jtbentley gravatar image

jtbentley
579 3 4 16

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2161
x1278
x884

asked: Aug 29 '10 at 01:52 PM

Seen: 1280 times

Last Updated: Aug 29 '10 at 01:52 PM