So I’ve recently delved into the world of vehicle physics. And I’m writing a 2D “tech” demo to make sure the physics are to my liking before moving the physics into my 3D rasterizer. Now, I love drifting and I need to find a way to determine whether the vehicle is sideways while it is moving. I thought of this concept:
KEY:
The yellow rectangle is the car, the black lines next to it are the wheels, the wheels closest to the bottom of the image are the front wheels of the car.
The red pair of numbers are the values of the velocity vector and the position vector added up, and a red line is drawn from the position to the velocity vector to represent the force.
The darker blue lines represent the borders to what I consider to be the “front” and “back” of the car.
The lighter blue areas simply represent the areas in which the front and the back of the car would be.
Now my question is how can I determine whether or not the velocity vector’s components are within the blue areas. Keep in mind that the car rotates lol