How could I Convert screenpoint to worldspace?

Is there an easy way to convert any point on my screen( x,y ) to world-space and direction? I noticed there is functions for it in C++ in the PlayerController.cpp file but they are not accessible in Blueprint. Is there a reason for this or can I simply make them be callable in blueprint?

There is a blueprint method for this, please see screenshot.

You missed my point. I don’t want to convert the mouse position, I want to convert ANY screen position to world-space. My game is not using the mouse.

maybe try this:



then you could rotate your foward vector by those x and y degrees to get a vector pointing in the direction you need to trace. normalize and multiply this by the distance you want to trace to get the end value, and use the camera position as the start value. the location of the hit result of the line trace should be the value you want.

i haven’t tested any of this, but the math sounds like it could work. i believe epic is working on coordinate space transformation nodes for a future update, so if this doesnt work, you can wait for their method.

Isn’t there some Transform nodes in blueprint, which will do this for you? I think they accept a vector and project it to View, World…

In any case you cannot exactly convert an X,Y point to a point in the world, because you are missing one axis. But you can do a trace from the converted point along the direction of camera to get that.

Hey ,

The Deproject functionality is what you’re looking for which is available in C++. We have exposed this functionality to blueprints internally, but unfortunately not in time for the upcoming 4.2 release. This should, however, be available in the 4.3 release.