Answers for "getmouse position unity"

C#
27

unity get mouse position

Vector3 worldPosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);
Posted by: Guest on July-16-2020
1

unity mouse click position

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

RaycastHit hit = new RaycastHit();

if (Physics.Raycast(ray, out hit))
{
	return hit.point;
}
Posted by: Guest on May-02-2020

C# Answers by Framework

Browse Popular Code Answers by Language