Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity 2d how to set an object or the mouse position

    Vector2 mousePos = new Vector2(camera.ScreenToWorldPoint(Input.mousePosition.x), camera.ScreenToWorldPoint(Input.mousePosition.y));        
Source by www.reddit.com #
 
PREVIOUS NEXT
Tagged: #unity #set #object #mouse #position
ADD COMMENT
Topic
Name
7+4 =