Snow boarder level player issue

based on tutorial set a circle collider for character head.
when his head bump to ground every thing is correct that mean trigger is work but his head go under the sprite shape collider…see image.

what’s the reason of this ?
and it need to say, collision detector set on continuous

please watch the video.

https://youtu.be/jCN2vgQxzfo

Hi Ali,

Welcome to our community! :slight_smile:
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.


See also:

1 Like

Hi Nina, thanks for reply.

Rick checked is trigger for barry’s head collider. so accordin to tutorial when a collider be in trigger mode two object overlap each other (when collision together).
so my game is correct in theory (charactor dived into the ground because of i say).

the main question is: why barry’s head collider didn’t overlap with ground (spirte shape) in tutorial video?! please watch end of (video 9 of snow boarder - Triggers To Restart Level)

It has been occupying my mind for several days!

You didn’t do anything wrong. However, as I wrote in my previous answer, something unexpected happened in Rick’s case: His Barry collides with the ground. This should not have happened. A trigger collider is not a solid collider. The correct behaviour is that Barry’s “trigger” collider moved into the ground. Like in your game.

If you prefer a bouncing head, you have to disable “Is Trigger”. And in your code, you need OnCollisionEnter2D instead of OnTriggerEnter2D. Add the script to the head game object with the collider, not to the parent.

1 Like

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

Privacy & Terms