How to transform the values from GuiNode to RootNode?

i attached a sphere with radius=50 to the guiNode. Then i attache an other sphere with the same radius to the rootNode and the sphere was much bigger then the sphere in the guiNode. I would like to have a sphere in the rootNode that have visual the same size as the one in the guiNode.

How can i compute the right proportions?



Thanks and regards!

You will have to take a step back and think about what you are trying to achieve. Remember that the GUI node is essentially 2d, and one point on the sphere represents 1 pixel. While the root node is in world-space, and different view projection entirely: 3d. So if you zoom in or out the size of the sphere will change relatively to the 2d sphere on the gui node.

Hi Sploreg,



my problem is that i wanted to know how to project the size in pixel to size in 3d. So it would be interesting how the proportions between a pixel and 3d-unit.

These methods on Camera will translate both ways:

[java]

camera.getWorldCoordinates(screenVector2f)

camera.getScreenCoordinates(worldVector3f)

[/java]