Why Does the head bump?

Hey :slight_smile:
I did the challenge alright, but something confuses me: The head goes through the snow sprite in my game, which makes sense because the head collider was a trigger. In rick’s version, the head bumps although he used OnTrigger and not OnCollision. (If I removed the trigger checkmark the head would bump but the Debug.Log will not be triggered).
Maybe it has to do with the fact that I put both the head colider and the script on the top game object, but I don’t see how…
It’s not critical to my project but I feel like I should understand it.

5 Likes

Hi shalev,

Actually, Rick’s Barry should have dived into the ground instead of bouncing off. In later videos, you can see, that he doesn’t bounce anymore. Rick suspects that the surface effector made the head bounce in this case. Sometimes, there are undesired side-effects, and since we didn’t write the Collider2D classes or the surface effector class ourselves, we cannot prevent those side-effects.

I hope this helped. :slight_smile:


See also:

5 Likes

Thank you! I did.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms