How to prevent player from going through obstacle?

Edit: This is explained later that the strange behavior is expected.

How can I prevent the player from going through the obstacles ?.

When I hit an obstacle, the player stop briefly, but if I keep moving then he will just pop right through.
Same for the dropping items.
I have tried to enable ‘kinetic’ on the static items, and I have tried to freeze the position on all axis. Still - the player pops right through.

Hi jkristia,

Welcome to our community! Enjoy the course and happy coding! :slight_smile:

The simplest solution for now is to slow the player down. In the next section (Project Boost), we are going to learn how to move a game object with Rigidbody methods. Once you completed that section, you could, if you want, try to apply your knowledge to your Obstacle Course game to achieve a faster player.

For now, slow the player down. You didn’t do anything wrong. It’s an inherent problem with the way we move our player in this section.

Did this help? :slight_smile:

See also:

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

Privacy & Terms