Jump to content
  • Advertisement
Sign in to follow this  
jf_wangfeng

How to simulate a 4-wheel vehicle?

This topic is 4846 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How to simulate a 4-wheel vehicle moving on the bumpy ground? I want that the Vehicle can move on a bumpy ground and the body of vehicle swing with the bumpy ground.

Share this post


Link to post
Share on other sites
Advertisement
A typical method would be to treat the wheels as 4 cylinders, which are constrained so that if they are intersecting some geometry, they are pushed out. You would then go about colliding the 4 cylinders with the geometry of the floor.

One problem with this method is that if the floor geometry is overly detailed, you could be doing needless tests. You can help prevent this by having a simplified version of the geometry for doing floor collisions, or just not using highly detailed geometry on parts of the map that the vehicle can drive on.

Another method could be used if you are using some sort of height map. You could simply read the minimum height of the wheels from the heightmap, based on their current positions, and then constrain them from going lower than that height.

For the vehicle body, you could simply use a rectangluar collision object, and collide with other geometry using the box. You may want a slightly more detailed collision object if you wish to be able to flip the vehicle on its back though.

Share this post


Link to post
Share on other sites
rays cast for each wheel, contacts made with high friction [acting as suspension and tires], and anti-roll techniques [torque applied when turning to keep wheels on ground]

doing a test with a cylinder is much more difficult to tweak to run reasonably, and has realistic but annoying issues like curbs could tip your vehicle if you slide into them.

this is an implementation of the above ideas in ODE
http://www.mindcontrol.org/~hplus/carworld.html

what I wonder is, is it reasonable to still use one ray when the wheels are massive [monster truck wheels?]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!