#Thread
1 messages · Page 1 of 1 (latest)
Add this log in your collision method, before the if:
Debug.log($"{gameObject.name} has collided with ({collisionInfo.collider.name})");
And show me what prints after this object hits your obstacle
So you remember when I said to name the object Obstacle
Not Obstacle
whats bthe difference there lol
The log I had you add put the entire string inside of parenthesis
they both say Obstacle?
No, one of them says Obstacle. The other says Obstacle
i dont see a difference
Space is a character
That's why I had the log wrap it in parenthesis
You have now learned exactly why you don't make the names of objects have code significance
Don't check an object's name to know what it is. Use CompareTag and check the tag instead.
https://docs.unity3d.com/ScriptReference/GameObject.CompareTag.html