public virtual void LookMode()
{ //Look at the clicked item.
Ray ray;
if (MouseLookEnabled == true)
{
ray = Camera.main.ViewportPointToRay(new Vector3(0.5f, 0.5f, 0f));
}
else
{
ray = Camera.main.ScreenPointToRay(Input.mousePosition);
}
RaycastHit hit = new RaycastHit();
if (Physics.Raycast(ray, out hit, lookRange))
{
//Debug.Log ("Hit made" + hit.transform.name);
ObjectInteraction objInt = hit.transform.GetComponent <ObjectInteraction>();
if (objInt != null)
{
objInt.LookDescription();
return;
}
}
}