Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

detect mouse in bottom of screen + unity

//Quick and dirty
private void Update()
{
	Vector3 mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);

  if (mousePos.y < 0)
  {
      Debug.Log("Mouse in bottom");
  }
}
 
PREVIOUS NEXT
Tagged: #detect #mouse #bottom #screen #unity
ADD COMMENT
Topic
Name
4+8 =