Search Unity

Strange Behaviour on Wheel Collider's mass

Discussion in 'Physics' started by diegomendes, Jul 3, 2018.

  1. diegomendes

    diegomendes

    Joined:
    Sep 20, 2014
    Posts:
    29
    Hello! I'm creating an 3D racing game, and I found something "interesting".

    I set the wheel's mass to 15, and test the game, but this creates a problem: after accelerating, when releases the accel. button, the car keeps accelerating for some seconds.

    After some research, I found that setting mass to 0.1 will solve(partially) this problem, but creates some other problems.

    But, the strange part is: if I start the game with wheel's mass at 0.1 an then change manually to 15, the problem above does not happens!

    And if I start the game with mass at 0.1, and change the mass via scripting to 15, the problem continues(even if I change the mass just after some time).

    So, anyone knows how this strange problems happens? I don't see any reasons for that(except that Wheel Collider is terrible in this new Unity versions).

    I'm using Unity 2018.1, and made all the tests changing ONLY the mass of all the four wheels.

    Sorry for any English errors, is not my primary language. Thanks in advance!
     
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    It looks like a bug in the Unity side. Changing the value via scripting should have the same effect as changing it in the editor. I recommend you to file a bug report with the scene and repro steps.
     
    diegomendes likes this.
  3. diegomendes

    diegomendes

    Joined:
    Sep 20, 2014
    Posts:
    29
    Yeah, looks like that if I do some change from the inspector, the wheel stops this strange behaviour, for example changing the forward extremum slip from 1 to 0.999 directly from the inspector.
     
  4. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    Please submit a bug report then. It would ensure the bug gets resolved eventually.
     
    diegomendes likes this.