Physics stuff

Does anyone know of some sample code for how to simulate gravity. i.e. it is easy to simulate something accelerating at -9.81 m/s/s but what do you do when it hits the ground, or how do you even work out that it has hit the ground.


I know a good url with many tutorial :
there’s a little bit of code…
I hope it can help u



If you want simulate real physics look for rigid body algorithms. You can easily simulate everything. Take a look at my program - it is not bullet-proof, but it works
Some links: