Sign in to follow this  
Prog101

realistic car collisions

Recommended Posts

Hi using DirectX and c++ i am making a car game the problem that i am having is trying to make thhe collisions look realistic when the car hits the walls (blocks that make up the walls) at the moment i just have the car negating the velocity so it bounces back off the wall pCar->vVelocity = -pCar->vVelocity; so how couuld i make it more realistic?

Share this post


Link to post
Share on other sites
I can advise you to try existing physics engines, like PhysX,Newton,ODE and so on. They have good implementations for differen vehicle types. Reinventing the wheel is out nowadays.

Share this post


Link to post
Share on other sites
theres all sorts of stuff you could do:

1) Sparks flying from car grinding on wall - google "particle engine" or equivelant.
2) Deform your model by that i mean when the car hits the wall dent the car and the wall either with a displacement map shader(GPU intensive) or by accessing the vertex buffer of the objects and manipulating them directly (CPU intensive).
3) Use decals which are basically relativly small textures of scuff,dirt and damage, and place these decals on your car at the point of impact.
4) rather than just reflecting your car off the wall try and implement true physics systems such as inertia,momentum,force,acceleration,velocity,friction etc.

well theres a few suggestions. Get googling and get some books from the library and hopefully you will get a nice little demo/game going. Addison wesley have a real time physics engine book that might help you out but don't qoute me on that.

good luck,

fanatic.

Share this post


Link to post
Share on other sites
I'd wrap an existing physics SDK in your own physics interface classes and use them. This method gives you a great deal of flexibility. If you want to change SDKs, you can do it quickly and easily just by changing the physics classes which wrap it. Done properly, you won't need to change any other code. You could also write your own physics simulator in the physics classes, if you really wanted to.

I'd suggest PhysX.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this