Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity get mouse position

Vector2 screenPosition = new Vector2(Input.mousePosition.x, Input.mousePosition.y);
Vector2 worldPosition = Camera.main.ScreenToWorldPoint(screenPosition);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #unity #mouse #position
ADD COMMENT
Topic
Name
3+2 =