Hi, I am testing out BabylonJS and when there is a collision I want to move back to the previous non-intersecting position. I made a little demo where I keep track of the previous position. But it isn’t working which has me kind of stumped. Coming from a functional background I would have expected this to work. I made a little demo where my sphere should reverse direction once it collides. Instead, it gets stuck inside the box:
Any idea why this is happening?