How can I unproject a camera view point to world?

I’m using the 3rd person blueprint example. I would like to do an intersection test with the world using a ray which starts at a particular point in camera view space in the direction of the camera’s rotation.
Is this something I can do using the built-in Blueprint stuff?

Hey Clapfoot,

Thanks for your question! It sounds like what you’re looking for is the ability to deproject from any 2D screen space to the 3D World–is that correct? We don’t have that functionality in for blueprints yet, but we expect it to be made available in our 4.2 update (see this post for more info). We have functionality for deprojecting mouse 2D location to 3D space using the Convert Mouse Location to World Space function (contextually available if you drag off from a Get Player Controller in your blueprint).

If neither of those sound what you’re looking for, let us know and we’ll be glad to help you figure out a solution.

Thanks!

-Steve

Thanks for the quick reply. The mouse position isn’t relevant for me, I am trying to ray cast from a targeting reticle which is fixed on the screen. Ideally it would be a function like:

WorldRay = Camera.ViewportPointToRay(viewPoint2D)

Can you suggest a workaround until 4.2? It sounds like the op from the forum post ended up exposing a custom function.