Jump to content
Sign in to follow this  
JohnAJ

screenToWorld unreliable for finding t target position?

Recommended Posts

I'm developing a mod where I need to get the position of the point that the player is aiming at. cursorTarget obviously won't cut it, but this thread suggested using the following:

screenToWorld [0.5, 0.5]

This works great most of the time. Not for bushes, but that's acceptable. Still, some buildings just don't want to play along. For example, the multistoried building along the Chernogorsk docks behaves really weird in conjunction with the screenToWorld command, as depicted in this video:

As you can see, when you aim towards the top of the building, the target position changes from x ~ 7000 to x ~ 5000. Can this be fixed, or is there a better solution?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×