EdBennett
(EdBennett)
1
Hi I’m making an RTS and in this I need to get know where the world space is based off of a point on the screen.
Now I can do this for the mouse, I use this script:
Now this works great for the mouse pointer. But I want to be able to get the world position from a 2DVector that is not the mouse.
Ideally some kind of node like this:
but just accept a 2d Vector.
Thanks guys
Ed
EdBennett
(EdBennett)
3
Wouldn’t that just return world position base on the mouse position? I’m looking to provide an X,Y coordinate then get the world space from that.
Everynone
(Everynone)
4
Vector that is not the mouse
Oop, somehow I read it the other way round, my bad. The node you’re after is called Deproject Screen to World
EdBennett
(EdBennett)
5
I have tried the Deproject, but I always seem to get 0,0,0
Regardless of the vector I enter. Can you see if I’m doing something wrong:
Everynone
(Everynone)
6
Connect Player Controller to the Deproject node.