Does the framework have a function that helps getting the 2d position on the screen of a 3d point in worldspace (with its view and projection matrix)? So like a reverse TRay that tells you where a 3d point ends up on the screen and not where a 2d screen position ends up in 3d space to select objects.
I want to create some lensflare effects which is why I need to know where my sun sprite currently is on the screen. I could fiddle around with the camera axis numbers until I get something useful. (The skydome and the sunsprite don't move, only rotate with the camera, so it's not so hard)
But I thought I check if there is a direct and exact way. Could be also useful for other stuff, like placing a textlabel next to an object without making it part of the 3D scene, just render it on canvas where the object is on screen.
I want to create some lensflare effects which is why I need to know where my sun sprite currently is on the screen. I could fiddle around with the camera axis numbers until I get something useful. (The skydome and the sunsprite don't move, only rotate with the camera, so it's not so hard)
But I thought I check if there is a direct and exact way. Could be also useful for other stuff, like placing a textlabel next to an object without making it part of the 3D scene, just render it on canvas where the object is on screen.
Comment