world/local Position for 2 objects having same parent

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
webmyster
Posts: 0
Joined: Thu Oct 20, 2011 2:50 pm

world/local Position for 2 objects having same parent

Post by webmyster » Wed Apr 04, 2012 2:58 pm

Hi,
As I understand, the worldPosition of an object is the combination of the localPosition of the object and the worldPosition of its parent. Right ?

I'm assuming that its worldOrientation and its localOrientation is set to identity (ie : no rotation). Moreover, there is no other intermediate object (direct relation).

Thus, if an object have its local position set to (0.0, 0.0, 0.0), then, its worldPosition is the same than the one of its parent. Right ?

Given two objects attached to the same parent, if both localPosition are set to (0.0, 0.0, 0.0), they should have the same worldPosition. Right ?

I have a scene with a camera and a gun both defined as son of a "vehicle" object. Each one has its localPosition equals to (0.0, 0.0, 0.0). But both have different worldPosition that is not the same than parent's one.
Did I miss a reference frame in the composition ?

mb
Posts: 0
Joined: Mon Feb 22, 2010 10:20 am

Re: world/local Position for 2 objects having same parent

Post by mb » Sat Apr 07, 2012 1:42 pm

webmyster wrote:Hi,
As I understand, the worldPosition of an object is the combination of the localPosition of the object and the worldPosition of its parent. Right ?

I'm assuming that its worldOrientation and its localOrientation is set to identity (ie : no rotation). Moreover, there is no other intermediate object (direct relation).

Thus, if an object have its local position set to (0.0, 0.0, 0.0), then, its worldPosition is the same than the one of its parent. Right ?

Given two objects attached to the same parent, if both localPosition are set to (0.0, 0.0, 0.0), they should have the same worldPosition. Right ?

I have a scene with a camera and a gun both defined as son of a "vehicle" object. Each one has its localPosition equals to (0.0, 0.0, 0.0). But both have different worldPosition that is not the same than parent's one.
Did I miss a reference frame in the composition ?
I tried to reproduce the situation but everything works as expected.
Could you post a simplified copy of your file?

Post Reply