How to pin point a target in the nodeGui layer?

how to pin point a target in the nodeGui layer?

I have a Spatial target at rootNode.
I want to put a mark on the nodeGui showing where the target is (unfoggable).
I thought I should raycast from the target and see where it hits on a invisible plane at nodeRoot just in front where the camera is facing, and then convert that to a nodeGui location.

but… is there a better way to do that? (if that would work of course)

http://javadoc.jmonkeyengine.org/com/jme3/renderer/Camera.html#getScreenCoordinates-com.jme3.math.Vector3f-com.jme3.math.Vector3f-

1 Like

good I asked, was going thru the painful path… thx!

any way to get the world bounds translated to the screen in the same manner? I thought on extents and the screen coordinates on them, I will brose the docs try to find something :).

EDIT: sqrt of AreaUtils.calcScreenArea(), does the trick