Sign in to follow this  
Drunken_Monkey

My car wheels are spinning out. OH NOES

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
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

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