[SOLVED]"Relative" setPos()


I have two nodes : “os” and “pandka”
I’d like to have the first one 10 units above the second.
There are two methods to achieve it :

    os.setPos(pandka, 0,0,10)

The first one works perfectly.

The second, “relative” one, puts the “os” node in the same place in space where “pandka” is, ignoring the last, “10” argument.

Can you tell me why?

Those two methods are not the same thing at all. In the first case, those transformation’s are done in os’ parent’s coordinate space. In the second case, in pandka’s coordinate space.
Remember that when the position is relative to the object, it’s scale also affects it. So I think you have a very high (or very low) scale set to one of your nodes so that you don’t notice the small difference.

Long story short, try a larger value than 10, in the second function call.

Thanks for your suggestion and explanation - great guess, it was the matter of scale (and my misunderstanding of relative position change :wink: ).
Now everything is clear :slight_smile: