This is driving me crazy.
I’ve imported an object from Blender and scaled to 0.5 along each axis. As I move my object around programmatically, I noticed that the real-time Editor values didn’t match what I’m setting in code.
So I put this simple test in my object’s Update():
transform.position.x = 5;
transform.position.y = 5;
transform.position.z = 5;
In the Editor though, my Object’s position shows as:
x = 5
y = 3.746596
z = 5.027662
Any help on why this is happening would be much appreciated.
My guess is one of 2 things
- Is your editor set to show the pivot or Center of the object. You can set this with the button between the transform buttons and the Global/Local button in the top toolbar. If your objects origin was not at zero in your 3d app, this will have an influence
- is this onbject parented to another object?
Thanks chubbspet,
Clicking the pivot/center button didn’t do anything. The numbers stayed the same in the Inspector. Curiously clicking global and local didn’t change anything in the Inspector either. I did have my object selected so that’s not the problem.
The object isn’t parented to anything. I’ll recreate this in Blender from scratch to see if the offset is coming from Blender.