I'm also interested in colliding objects. However, I don’t care if you use trigonometry or not. I want to start playing the car, but first I should get to know the physical part of the solid body. I'm throwing a dice, is that how it rolls? When this is done, it may follow that the cube is a car.
For now, I’m trying to collide objects in 2d. This is similar to the adjacent topic: “2D ball collisions without trigonometry” For me, it’s already complicated where you are.
I came up with a simpler thing, but unfortunately it’s not good for car gaming, but it can be good for smaller 2d games.
IT IS VERY IMPORTANT THAT THE SUBJECT IS IRREGULAR! (I can't detect a car as a rectangle)
I thought a lot, with a pencil in my hand, tossed, dropped to see how it could be done as easily as possible in a collision. No trigonometry.
An object is defined by 3 things: X-vector, Y-vector, Rotate –vector
If the collision can be avoided by negating the X-vector, negate it and move on
If not, see if negating the Y-vector avoids a collision. If so, negate it and move on.
If not, see to see if you can avoid collision by negating the direction of rotation.
Around the three things, one is sure to resolve the collision and the object goes on.
This, if we look closely, cheats a lot. In addition, inertia, momentum, impulse does not transmit. This is not good for car play.
On the other hand, the environment I did is good for anyone who likes to develop it. you can put the physical part between the do: loops of the “boss” loop. Everything is blocked, nothing else needs to be addressed. You can specify any image, making sensory dots from the edges of the image. The distance between the sensor points is adjustable.
I hope you have an idea for someone to be realistic. Translating your process into 3D could provide a very good foundation for your car game. (or an fps game where if you shoot into the wall, the bricks will realistically fly apart)
[ You are not allowed to view this attachment ]