wheel skidding

Topics: User Forum
Jan 2, 2013 at 11:19 PM

Hi!

 

I'm with a racing sidescroller (still! ^^ ) where a car is a box with two lineJoints and two wheels. I'd like to know when a wheel (whose lineJoint motor is activated) loses traction. I don't mean when the wheel goes airbone, but when the wheel starts skidding. I think that the answer is when the torque is bigger than the force the tyre can apply to the ground, but I don't know how to translate this into farseer.

 

Thanks a lot!

Kak

Jan 5, 2013 at 12:15 PM

One way could possibly be to check if there is lateral velocity with respect to the forward direction. Here's a tutorial that might give you some ideas:

http://www.iforce2d.net/b2dtut/top-down-car

Jan 5, 2013 at 12:29 PM

Hi Jerry, thanks for your answer,

 

unfortunately I'm trying a sidescroller (something like supermario but with cars). I don't think the same principle can be applied as a top down car racing game :(

 

Thanks!

Kak

Jan 5, 2013 at 4:10 PM

For the record, I just found that the difference or quotient between the wheel AngularVelocity and its LinearVelocity.Length() is approximately what I needed :)