Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity convert mouse position to world position in editor mode

//Unity: Convert mouse position in screen point to world position.
Event e = Event.current;
Vector3 _mousePos = e.mousePosition;
Vector3 _mouseWorldPos = GUIUtility.GUIToScreenPoint(_mousePos);
 
PREVIOUS NEXT
Tagged: #unity #convert #mouse #position #world #position #editor #mode
ADD COMMENT
Topic
Name
9+8 =