A question about collisions

Perg

Member
i'm building a code to run a espaceship that uses separate x and y speeds and accelerations, and i'm trying to build a collision that "deflects" the spaceship from walls, but i can't figure out a way that work in every speed vector and "deflection angle", i have tried using the build-in collisions and physics but no result at all, the best i have done was a code that had a 50/50 chance of reflecting in a 45 angle or clipping through the wall (especially when colliding with 2 walls) . is there any way to do this?
 
Top