我有Group
由其他Group
对象组成的对象,最终由Actor
对象组成。现在,当组和演员被旋转、偏移和缩放时,“世界”中的坐标或相对于根节点的坐标会发生变化。如何获取演员本地空间中某个点的世界坐标?
为了说明更多,这是我想要的一个例子:
Group parentGroup;
Actor childInGroup;
...
parentGroup.addActor(childInGroup);
childInGroup.setPosition(10f, 15f);
childInGroup.setRotation(45f);
// Get the childInGroup's position in the world
float childWorldPosX = ...; // This is what I want to know
float childWorldPosY = ...; // ... and this.