So, I came across this problem several times:
I have some kind of object in my 3D scene graphic that is a child of some other object. Lets call them c (Child) and p (Parent).
c position is relative to p. Thus, c may have a position (1,0,0), but, of course, due to the fact that p has some other position, say (1,2,3), it does not actually appear in the original of our world, but at (2, 2,3).
Now let's say, for some reason, we want to know the absolute position in world coordinates (or rotation, the problem is the same), as is usually done?
Should c be aware of this parent and be able to request this position and add it to its own, finally returning the absolute position?
source
share