Jump to content
  • Advertisement
Sign in to follow this  
Drunken_Monkey

My car wheels are spinning out. OH NOES

This topic is 4057 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

http://img523.imageshack.us/img523/4733/odecar2jc2.jpg Check out my pimp-mobile. When it's at rest, everything is fine. But look what happens when I start rotating the tires: http://img523.imageshack.us/img523/2606/odecar1xs7.jpg They spin out. This code was written in ODE. The tires are attached to the body of the vehicle by a Hinge2 joint. Is there a better way to attach the wheels to the car? If not, what kind of technique can I use to stop the wheels from spinning out at the slightest push?

Share this post


Link to post
Share on other sites
Advertisement
I've never actually used ODE (or even done car physics yet), but surely a ball and socket joint with no twist limit would make much more sense for attaching the wheels to the car body.

Regards,
ViLiO

Share this post


Link to post
Share on other sites
Indeed a hinge is not the right joint for you. A hinge is the type of joint for a door. I'm not sure of the ODE joint types off the top of my head, but either a ball-in-socket that puts some force would work. Otherwise you should look for examples of ray-cast cars. They seem to be pretty popular.

Share this post


Link to post
Share on other sites
A simple solution would be to manually set the rotation for both wheels each update since you'll have to set them anyways to allow steering.

Share this post


Link to post
Share on other sites
Quote:
Original post by Drunken_Monkey
Just to be clear, I wasn't using the type of hinge you thinking about, NickGravelyn. It was this type of joint.

Anyway, thanks for the advice, I'll look into ray-cast cars and try to see if a ball and socket joint would work.


That's a sweet joint type.

My guess is that once your wheel starts turning, axis 1 starts spinning around too easily. Is there a way to perhaps set more resistance on that axis? Or perhaps a way to not allow that axis to rotate without user input? That would be a good method for controlling steering.

Anyway, hopefully you figure something out.

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!