Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Wheel collider space to stop car

Discussion in 'Physics' started by radamirez, Jun 3, 2018.

  1. radamirez

    radamirez

    Joined:
    Jun 3, 2018
    Posts:
    1
    Hi guy , i have implemented a car with four wheel collider like the official tutorial.
    The car is more realistic like apply a force .
    I need to know how many metres the car need to stop, but without know the decelleration force.
    It is possible?
    space to stop is approximately equal to velocity ^2 / decelleration;
    and i can get the velocity by rigidbody.

    And another question, can i set an acceleration parameter and the torque adapt its value? or set a velocity cruise to take my car at the same velority ?

    i can calculate the past acceleration with old velocity and currVelocity but in the future frame this value can change.

    thanks
     
  2. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    884
    Wellcome to this forum. I'm a user.
    At 100km/h ~50m or units [link]
    I do not use the wheel collider. I use a sphere and a joint.
    To get the wheel speed I pick up the radius of the weel and the revolutions per second.
    I apply a torque opposite to revolution and full brack when stop blocking the joint. But probably there is way more optimise ways in the asset store or search here in the forum.
    For the cruse velocity, you can apply torque up to a point the car is not accelerating any more. You need some drag (aerodynamic or revolution). You can apply less torque when the weel is increasing in revolutions. And then play with the value via inspector.