# How could I Convert screenpoint to worldspace?

**URL:** <https://forums.unrealengine.com/t/how-could-i-convert-screenpoint-to-worldspace/278218>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [March 24, 2014, 2:18pm UTC](https://forums.unrealengine.com/t/how-could-i-convert-screenpoint-to-worldspace/278218 "2014-03-24T14:18:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_b563ab12](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b563ab12](https://forums.unrealengine.com/u/anonymous_user_b563ab12)\
**Post date:** [March 24, 2014, 2:18pm UTC](https://forums.unrealengine.com/t/how-could-i-convert-screenpoint-to-worldspace/278218/1 "2014-03-24T14:18:22Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![brettclutch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@brettclutch](https://forums.unrealengine.com/u/brettclutch)\
**Post date:** [May 7, 2014, 12:44am UTC](https://forums.unrealengine.com/t/how-could-i-convert-screenpoint-to-worldspace/278218/2 "2014-05-07T00:44:31Z")

</div>

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

 ![5793-capture.](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/5/e/e5e3a7a4bbe52f1a99440139e73a93240fbb0d55.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b563ab12](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b563ab12](https://forums.unrealengine.com/u/anonymous_user_b563ab12)\
**Post date:** [May 7, 2014, 11:52am UTC](https://forums.unrealengine.com/t/how-could-i-convert-screenpoint-to-worldspace/278218/3 "2014-05-07T11:52:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ScottSpadea](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/scottspadea/32/1194682_2.png) [@ScottSpadea](https://forums.unrealengine.com/u/ScottSpadea)\
**Post date:** [June 3, 2014, 8:49am UTC](https://forums.unrealengine.com/t/how-could-i-convert-screenpoint-to-worldspace/278218/4 "2014-06-03T08:49:09Z")

</div>

maybe try this:

Xdeg=(Xpos/ScreenWidth)\*FOV-(FOV/2)

Ydeg=(Ypos/ScreenHeight)\*FOV-(FOV/2)

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.

---

<div class="post-metadata">

**Author:** ![mindfane](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mindfane/32/710746_2.png) [@mindfane](https://forums.unrealengine.com/u/mindfane)\
**Post date:** [June 3, 2014, 9:17am UTC](https://forums.unrealengine.com/t/how-could-i-convert-screenpoint-to-worldspace/278218/5 "2014-06-03T09:17:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Steve\_Allison](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Steve\_Allison](https://forums.unrealengine.com/u/Steve_Allison)\
**Post date:** [June 3, 2014, 9:47pm UTC](https://forums.unrealengine.com/t/how-could-i-convert-screenpoint-to-worldspace/278218/6 "2014-06-03T21:47:04Z")

</div>

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.

-
