   Lateral forces on car wheels + Acceleration problems
  Hi all,I''m making a car game, and i''m making the physics from this article: http://home.planet.nl/~monstrous/tutcar.html, but i''m having a bit of trouble when it comes to the ''high speed cornering part'', getting it to slide into corners... things like that.i''m doing something like this (i dont have the code with me: float slipangle = atan2(velocity.z,velocity.x);frontwheelangle = slipangle+carangle-steerangle;backwheelangle = slipangle-carangle;frontlateralforce = (frontcorneringstiffness*frontwheelangle)*weight;backalteralforce = (backcorneringstiffness*backwheelangle)*weight;  Pretty much exactly how it''s done in the guy''s example code. I''ve got the longitudinal forces sorted and they work fine, but i''m lost as to what i''m meant to do with these lateral to make the car turn properly.And the other thing,When calculating the weight on the front and rear axles, you use the magnitude of the acceleration (sqrt(a.x*a.x + a.y*a.y + a.z*a.z), but in the equation it''s meant to be posotive for acceleration and negative for deceleration. But since it''s always going to come out of the sqrt function as posotive, how are you meant to tell if it''s accelerating or decelerating?Thanks for any help,--helicon56.  
  While I hesitate to bump a post from nearly a year ago, I am running into a similar problem and have yet to find an answer.What is a good way to take a Vector, say acceleration, and find a lateral, or longitudinal componenet relative to some object?I had something working alright, BUT getting the lenght of the acceleration vector is needed, which cancels out the negative sign if you slam on the brakes.  So in the end I get more weight on my rear tires nomatter which way the car swerves.Suggestions? Without these forces I cant have wheels...without wheels I have a two dimensional hovercraft racer. ;  ok well if you have a vector for the direction of your car then you can take the dot product of that vector with your acceleration vector. If the dot product is positive then your car is accelerating in the direction its facing, if its negative then your car is accelerating backwards (i.e. decelerating, as long as your car isn''t in reverse). ;  Knew it would be something simple... Good thing I asked before smashing my head against the wall for a few more hours ;  to decompose a vector to longitudinal and lateral components along an axis, Vlong = Axis * V.Dot(Axis);Vlat = V - Vlong;if axis is not normalisedVlong = Axis * (V.Dot(Axis) / Axis.Dot(Axis));Vlat = V - Vlong;;  Another question, if I may;http://home.planet.nl/~monstrous/tutstab.htmlaround 1/4 of the way down is a derivitive for a slip-ratio equation.  Where does the "B" come from?   