Hello, I need your help with a problem in the management of physical and gravity, I need some logic I think ...
In concept I want to implement is a ball inside a frame (a square) and that as I rotate the square as the key is pressed, the beanbag react to the event and according to the position of the box to move or fall.
So far I've only made the beanbag advance but when the angle of the layer with the square is 270 meor force or momentum is reversed and I'm not getting to create an algorithm that allows me to simulate this effect.
Have any idea??