Hi guys, I believe this is a very simplistic question, but I havent managed to find an answer to this one (at least one that I would understand).
My code:
bool bIsButtonDown = Input.GetButton("Fire1");
if (bIsButtonDown)
{
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
RaycastHit rch;// = new RaycastHit();
}
After hitting an object I would like to get info (tag, or more prefferably name) of the object. My goal is very simple - three boxes in the scene, and I want something to happen when one of them is hit. After getting info it is probably just a simple “switch” but I can`t seem to understand how to get that info.
Being a noob, it will help me even if you can at least point me in the right direction.