I'm writing my own physics logic for my game. I have it mostly working, but I everything is so coupled together. Right now the logic for collision detection and collision resolution seem to be very coupled. It makes the code messy and makes it harder to understand what's going on.
What I really want is for some way to have one system handle the collision detection and another system handle the collision resolution. Problem is that collision resolution relies on data given from collision detection. For example I reflect the direction of the bullets in my game if they hit a wall, which currently requires knowing the direction the bullet collided on the wall from.
Basically what I want is
Collision Detection System: Take all the transforms in the game and determine which pairs are colliding.
Collision Resolution System: Take all the colliding pairs and then perform different kinds of collision resolution depending on what kind of objects collided.
Sorry if this is super vague. I think I might need to grasp some more advanced ECS patterns to get this to work. I also wish I had relations so that I could model this better, maybe one day haha.