Collision and bounding box - Don't let the player pass

I’m trying to figure out how to bounce the player off the bounding box (can be rotated) so it kinda “glides” along the box edge without getting stuck. I just need a 2d example. Any ideas how to achieve this? Perhaps just vector maths or need a ray?

each(boundingInfos, info => {
     if (info?.intersectsPoint(player.position)) {
          // player.position = oldPosition;

Hi, I don’t know if Babylon has integrated calculations for that, but you can just use math.
Assuming the player hits the collider with angle A, so you rotate the player based on axe y by angle A, then let the player continue his movements.
Note that angle A is always equal to angle B.

With the technique, player will be stack if he hits the collider with A=90°, so be aware.

BABYLON.Vector3.Reflect would be the way to go