Yellow is parent node
Red is child of Yellow
Blue is child of Red (not Yellow!)
How to get Blue to it’s position in the picture?
(Red is moved back from Yellow by 1 unit, Yellow is moved left from Yellow by 1 unit and facing it. In other words, Red “sees” the front of Yellow, Blue sees the left side of Yellow).
I think you should set all positions as you wish without parenting and then use wrtReparentTo() instead of reparentTo(). Or use setPos(render, world_pos), setHpr(render, world_hpr).
If I understand the question.
The “wrt” prefix stands for “with respect to”. This special method works like reparentto(), except that it automatically recomputes the local transform on myModel to compensate for the change in transform under the new parent, so that the node ends up in the same position relative to the world.
You could reparent it to yellow, orient it appropriately, then use wrtReparentTo(red).