Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

PHYSICS bug: Wheel colliders do not wake up.

Discussion in '5.3 Beta' started by Foxxis, Nov 27, 2015.

  1. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,107
    (Where is the Physics prefix? ;-) )

    Just want to add this here as well since it applies to 5.3 as well:

    Case 747895 https://fogbugz.unity3d.com/default.asp?747895_gmsqj94tlfnrf6q3

    Basically, wheel colliders will not roll unless they have motortorque applied. So, having a cart (without motor) and attempting to push it will not work with the current wheel collider implementation. Same thing goes for attaching a trailer to a car. The trailer will not roll even though the car is attempting to pull it with a large force. Only after applying motortorque (can be a very small value, say 0.1) will the wheels "wake up" and behave properly.

    This has been verified by QA, apparently bounced with the physics team (who considers it a feature). I have logged it as a feature request as well. https://feedback.unity3d.com/sugges...he-wheel-collider-to-enable-it-to-roll-freely)

    But really, this is a bug. Having the requirement of adding motor torque to a wheel in order for it to respect external forces applied to its rigid body has to be considered a bug.

    Please, please fix this. Having the wheels waking up when external forces are applied to the rigid body has to be a relatively simple check to add...?

    Thanks in advance!
     
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,727
    In your OnCollisionEnter for the rigidbody, you can wake up the wheels with ease. 4-5 lines of code? This will get done in 10 mins tops vs waiting for (presumably) forever for the train that's not coming?

    I do agree for what it is worth :)
     
  3. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,107
    We currently do that, of course. But it requires detecting cases where the wheels should be able to move freely which can be complex in a dynamic environment. We have to detect cases such as the player pushing a box, which pushes another box, which in turn pushes a cart. So we have to check for collisions on the cart and then add motortorque if a collision (or any other external force) is detected.

    So I am definitely not waiting for the train to arrive. I am taking another train for now, while at the same time I am telling the engine driver that his train is broken and asking him to fix it and hurry to the station. ;)
     
  4. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,727
    There's leaves on the line at Unity HQ!
     
  5. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,107
    Haha - aptly put! :D
    Seriously though, while not having insight into how the code looks, improving the waking conditions for the wheel colliders has to be relatively simple, and I am sure the current behaviour is not really desired by Unity either....

    But given the state of 5.2, 5.3 beta, Speed Tree performance (cough, cough) I am guessing the team are a tiny bit busy. :)
     
unityunity