hey gang! I'm trying to follow along in the "how to make an RPG in Unity" series, but for whatever reason I got stuck on the Interactables part. I thought I might have messed up somewhere along the line, but now even after adding the following line, I still get no output, even in the log.
``if (Input.GetMouseButtonDown(1))
{
Debug.Log("Mouse button 1 down: " + Input.GetMouseButtonDown(1));
if (Physics.Raycast(ray, out hit, 100))
{
{
Interactable interactable = hit.collider.GetComponent<Interactable>();
if (interactable != null)
{
Debug.Log("Interactable hit: " + hit.collider.name);
Debug.Log("We hit" + hit.collider.name + " " + hit.point);
SetFocus(interactable);
}
else
{
Debug.Log("Interactable not hit: " + hit.collider.name);
Debug.Log("We hit" + hit.collider.name + " " + hit.point);
}
// check if we hit an interactable
// if we did, set it as our focus
}
}
} ``