# ConvertMouseLocationToWorldSpaceが変な値を示す

**URL:** <https://forums.unrealengine.com/t/convertmouselocationtoworldspace/434324>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE4, question, Blueprint\
**Created:** [September 23, 2018, 8:29am UTC](https://forums.unrealengine.com/t/convertmouselocationtoworldspace/434324 "2018-09-23T08:29:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Na2kaze](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Na2kaze](https://forums.unrealengine.com/u/Na2kaze)\
**Post date:** [September 23, 2018, 8:29am UTC](https://forums.unrealengine.com/t/convertmouselocationtoworldspace/434324/1 "2018-09-23T08:29:30Z")

</div>

ConvertMouseLocationToWorldSpaceを用いて座標（x-100,y-100,z100）にあるアクタをクリックして座標を取得したのですが、  
  
(x-1.367,y176.218,z830.000）という座標が出てきました。  
  
  
（x-100,y-100,z100）という座標を示すためにはどうすればよいのでしょうか。またどうしてこのような値が表示されるのでしょうか。ご教授よろしくお願いいたします。

 ![254478-125.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/a/b/0ab04902f8071f83f5deb7a556ac6e542bb727e2.png)

LocalPlayerControllerでの実装

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [September 23, 2018, 12:10pm UTC](https://forums.unrealengine.com/t/convertmouselocationtoworldspace/434324/2 "2018-09-23T12:10:24Z")

</div>

You need to use world direction:

 ![254511-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/2/1/821ff5899eaa7c24791c0f11f0b9fc0e8c12eeef.png)

This projects the mouse space coordinates into the 3d world.

Note: I google translated your question, I hope I’m not missing the point.

---

<div class="post-metadata">

**Author:** ![Na2kaze](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Na2kaze](https://forums.unrealengine.com/u/Na2kaze)\
**Post date:** [September 25, 2018, 1:30am UTC](https://forums.unrealengine.com/t/convertmouselocationtoworldspace/434324/3 "2018-09-25T01:30:49Z")

</div>

thanks you for your answering  
  
I made a suggested implementation to the PlayterController   
  
It is slightly off the mouse cursor

 ![254642-2018-09-25-4-li.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/e/b/3eb3fdd69b61591118610c444977e6b8dca24e81.jpeg)

 ![254648-54546.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/0/2/902442943d5534f50dadeeb85ceb985be3fc92b3.png)

PlayerController
