Not really understanding the other part.
public class Scorer : MonoBehaviour
{
int hits = 0;
private void OnCollisionEnter(Collision other)
{
if(other.gameObject.tag != "Hit")
{
hits++;
Debug.Log("You've bumped into a thing this many times: " + hits);
}
}
}
In the if(other.gameObject.tag != "Hit")
I understand why I would use != “Hit” which is pretty much saying if the object I’m hitting doesn’t equal Hit then gain a point and if it does add nothing.
The part that’s confusing me isif(other.gameObject.tag
?? I guess I’m not understanding why I would add other there.