Answers for "unity check if theres a wall between"

0

unity check if theres a wall between

RaycastHit hit;
 if (Physics.Linecast (transform.position, target.transform.position, out hit)) 
 {
 	if(hit.transform.tag == "player")
 		{
 			//do something 
 		} 
 }
Posted by: Guest on February-28-2021

Code answers related to "unity check if theres a wall between"

Browse Popular Code Answers by Language