I'm currently brainstorming how the physics for my game engine is going to be handled. It's top down and I'm thinking of using ray casting for collision detection. I've reached two potential problems (I want collisions to be pretty precise but of course not to operation heavy).
I'd like to use 2 different polygons for each object. One box to check collisions with first and then a polygon for precise checking. Is this wise to do when also checking collisions with ray casting? Or should I go for the more precise polygon right away?
Say I'm going to move an object 10 units X-wise and another object 10 units Y-wise how do I know "when" along this movement they collided so that if they collided after moving 5 units I could handle events at that point? (One might bounce and move back the same 5 units traveled in the same execution of my update or get instantly destroyed in which case it wouldn't collide with a third object it otherwise would have collided with)
This could be a bit overkill but I still wanna know how one could go about handling this.