I have an issue with creating a proper boundary in GameMaker Studio when using a physics enabled room.
My room has a gravity of 0, as it is in Space. My player object has the default values, but a friction of 10 with a box shaped collision shape. I also use View0 on a 1280x720 room with a 1280x720 view. That is to be able to do screen shakes and other neat effects.
I really struggle with containing my player object properly to the room. When I use a collision with view0_boundary and add
phy_position_x = phy_position_previousx;
phy_position_y = phy_position_previousy;
then my ship would get stuck at the screen borders very frequently.
I also tried adding some sprites that block the player off the room and created a sprite, 1280x720 and spawned them at the borders. I gave my player empty events for them and set their density to 0, making them static. However, this resulted in the same problem, I got stuck in them.
I need a smooth solution for this, obviously, to have a fun experience. I have this problem quite for a while, so please help me understanding how to do this properly.