How to make player bounce back from wall?

How to make an invisible wall to not make the player go out of bounds? Maybe add a bounce back like ping pong.

Hi @asterrisk and welcome!

You can add an entity with a static rigidbody component and a collision component. Set the half-extents of the collision component to match the size of the wall.

Optionally, you can add a script that applies a force to the player on collision, but you’ll need to find a way to calculate the direction.

This helped. Thank you so much!