Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Bobyteal on August 03, 2017, 09:59:43 AM
-
Hi :)
I want to rotate the camera on the left/right when the mouse reach the edge of the screen. So I know how to do it with mousePosition, but my little problem is that this only works on a very precise resolution, I would like to do a system that works for all resolutions !
Any idea ? Thank you !
-
https://docs.unity3d.com/ScriptReference/Input-mousePosition.html
I am not sure if I understand you correctly, but you can always get current screen width by Screen.width
, and compare it with Input.mousePosition
.
-
You have to convert your mouse position to the in-game world point with the action "Screen To World Point" to get a resolution-indepependent point in space.
If that wasn't what you were looking for, there's an action on the Ecosystem called "Get Mouse Position Advanced" with the option to get the input from screen center.
-
Thanks Deek, that led me to the solution (screenpick action), appreciate your help ;)