Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity mouse click position

Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);

RaycastHit hit = new RaycastHit();

if (Physics.Raycast(ray, out hit))
{
	return hit.point;
}
 
PREVIOUS NEXT
Tagged: #unity #mouse #click #position
ADD COMMENT
Topic
Name
3+7 =