OpenGL and vehicles

Hi, I don't really have any code to show you because I don't actually know what to do, but I'm aiming to get a car moving like a car using OpenGL to draw it in a 3D world and SDL to handle events

I currently have the car being drawn in an empty 3D space, and can move it around using SDL, but I'm wondering if anyone has any idea about how to move it like a real car should move?

I've tried googling my problem to no avail, and am starting to get a little frustrated with my failed attempts. I'm assuming I'll need to do something math related to get this working, but I have no idea what the equation may be, or how to implement it

Anyone have any suggestions?
Thanks in advance
Something like this as your acceleration vs time maybe?
f(x) = x/(x^2+1)
You can integrate it to get
1/2(ln (x^2+1))
Which gives you the velocities at time x.
Better than the equation I currently have (being nothing) but how would I implement it to make sure that the velocity of the vehicle moves it forwards in relation to the way the mesh is facing?
closed account (zb0S216C)
Perhaps this: http://www.asawicki.info/Mirror/Car%20Physics%20for%20Games/Car%20Physics%20for%20Games.html could give you some assistance. It works with 2-dimensional vehicle physics, but adding a 3rd axis into each equation shouldn't be too much of a problem.

Wazzak
Last edited on
Topic archived. No new replies allowed.