Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

d000hg

Integrator for suspension in a car.

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

Currently for my timestep I get the position+velocity of the suspension point at the start and end of the timestep assuming the spring does nothing. From those positions I work out how far the spring is compressed at both times and from the average find an impulse to apply. But obviously as the car is moving the effect of the spring means the position/velocity at the end of the timestep is not independent of the spring. It wors well for 0.01s timesteps but not larger. Since it''s at the corner of the car I can''t do a simple mass-spring system: any ideas?

Share this post


Link to post
Share on other sites
Advertisement
Well basically I''m modelling suspension as simple damped hooke''s law springs. The compression force is F=kx and the damping force F=cv (c,k are constants x,v are pos and vel - there are some minus signs somewhere too). Using the method already explained I get position of the atachment points at start/projected end of update and drop a vertical of lengthl=spring length. The depth this penetrates the ground generates x and the velocity in this direction is the z component of the velocity of the point on the car at the time. The car is treated as a box with a centre of mass and inertial tensor which the force calculated is applied to at the attachment points.

Share this post


Link to post
Share on other sites
I do it in a diff. way:
I handle spring force like any other force. I calculate it when integrating and simply apply it to the body. A don''t understand why you average. It''s a force like any other, no need to handle it diferently.

Share this post


Link to post
Share on other sites
In my update I take the force+torque applied to a body at the start of the timeStep as constant and integrate the rotation,position and velocities from this. My integrator doesn''t understand non-constant forces while the force from the suspension does change over time. If I just take the initial force on the suspension for the whole timeStep it''s not as good (like using x+=v.dt instead of x+=v.dt+ 1/2.a.dt.dt) so I''m doing a very approximate integral kind of

Share this post


Link to post
Share on other sites

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