Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Problem with wheel collider

Discussion in 'Physics' started by PhaseQuad, Jan 10, 2022.

  1. PhaseQuad

    PhaseQuad

    Joined:
    Jun 14, 2017
    Posts:
    39
    Hello all.
    I get value from "groundHitR.sidewaysSlip" and have indentified that when this value < 1 the car slowly skids, its good, but when this value = or > 1, the car very fast turn around and stops.
    I need to turn off this, beacuse when car start turn around, it's not can turn in other direction or continue move, and no settings of wheel collider does nothing for setup this.

    I tried this:
    Code (CSharp):
    1. if (driftAngle < 0.9f){ // driftAngle= groundHitR.sidewaysSlip from rear wheel
    2.   WHFriction.extremumValue = 0.4f; // I tried all values, slip, stiffness e.t.c, it's does no metter because all this values just power of slip;
    3. }else{
    4.   WHFriction.extremumValue = 3f; //if this value will be 2 or 1, it's not working, because need full exclude the car turn around
    5. }
    It works, but very very bad, beacuse the car moves like jumping when angle of car more about 30 degrees and of course fast turn back in other direction, also this is small angle for real powerfull driftcar, if I increase driftangle in condition, the car will be turn around again.
    if I setup all parameters of car with wheels for move like on ice, all works maybe more fine but not realistic and car no have handling. How I can turn off this and allow to car moves like real drift car with big angle? Of course I can write myself when the car must lose control.
     
    Last edited: Jan 10, 2022
  2. unity_44234FBC39E5661FBF5B

    unity_44234FBC39E5661FBF5B

    Joined:
    May 11, 2021
    Posts:
    29
    Have you tried watching this video?