Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Unity 5 : Wheel colliders

Discussion in 'Unity 5 Pre-order Beta' started by Igniuss, Nov 4, 2014.

  1. Igniuss

    Igniuss

    Joined:
    Nov 4, 2014
    Posts:
    14
    Hi, I'd like to know the reason for limiting the Wheel coliders in Unity 5, I'm working on a vehicle building game and the wheel limit came as kind of a shock.

    Sorry if this isn't the right forum location for this, but it's the closest I could find.

    Igniuss~
     
  2. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    Igniuss likes this.
  3. Igniuss

    Igniuss

    Joined:
    Nov 4, 2014
    Posts:
    14
    The main problem is, people will be able to add as many wheels as they want to their vehicles.
    We've had players make tanks with over 80 wheels. So migrating to Unity 5 would mean every vehicle with over 20 wheels wouldn't work anymore. Or at least not without having to convert it with some sort of work-around.

    Thanks for the link, I'll read through there to see if there's a way to increase it or something.
     
  4. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    There isn't I've already read through it, I think the limit is per RigidBody, so choices are:

    1) Make a hard limit of 20 per rigidbody, if they want more split the tanks into sections with joints.
    2) Make the extra wheels only visual and have the position be an average of the wheels either side.
     
  5. Igniuss

    Igniuss

    Joined:
    Nov 4, 2014
    Posts:
    14
    Darn.
    I guess we'll figure something out. Thanks for the help Jonny.
     
  6. Roni92

    Roni92

    Joined:
    Nov 29, 2013
    Posts:
    225
    I will join thread to inform on how new wheel collider works(from what I observed). It is still very limited in use but in very different way than in physx2.8. It works properly only when connected to one rigidbody. What I mean is that wheel's friction calculation takes into account only rigidbody to what wheel colliders is attached to. Its kinda hard to explain, so I'll make simple example when it fails: when you attach wheel collider to car's physically simulated A-arms. Then car will slip on ground as on ice, because wheel's friction is only as big as a-arm weight.... Again Im disappointed with Physx... stupid simplifications. On positive side is that when you make simple game, where wheels are connected directly to car's rigidbody that has proper weight, friction model finally works as it should, and pretty realistic behaviours are possible to simulate( I guess it should be now possible to make game with physics comparable with that in project cars )
     
  7. Igniuss

    Igniuss

    Joined:
    Nov 4, 2014
    Posts:
    14
    That's even worse then expected...
    Guess making our own wheel colider is something we'll have to look into if this is the case..
    especially since people can detach certain parts of their vehicle (and make it a separate rigid body) in our game. Then the wheel on that rigidbody wouldn't act the way it should, since the weight wouldn't be the total weight of the vehicle (if I understand correctly)
    Boy oh boy, upgrading to Unity 5 will be a pain.
     
  8. Roni92

    Roni92

    Joined:
    Nov 29, 2013
    Posts:
    225
    Yup, you understood perfectly. There is possible workaround (kinda like physics cheat) to just set wheel's stiffnes factor to muuch bigger ( you could calculate how much add to stiffnes factor by using formula that calculates total vehicle weight, but I guess it would be hard adn time consuming to tweak, but should be feasible anyway if you are stubborn enough to fight with simplifications xD ! )
     
  9. Igniuss

    Igniuss

    Joined:
    Nov 4, 2014
    Posts:
    14
    That's actually a good point.
    Thanks for the input man. Really appreciate it :D
     
  10. Roni92

    Roni92

    Joined:
    Nov 29, 2013
    Posts:
    225
    Glad I could help ! I wil probably make script for this, as I'm in racing games too if will have some free time in near future ;)
     
  11. pauloaguiar

    pauloaguiar

    Joined:
    May 13, 2009
    Posts:
    700
    Apparently the new WheelCollider, for me in my view is weird.
    Someone has tested the new wheelsCollider in regular vehicles?
    Share the videos of demonstration of how it works the new WheelsColliders, and settings.
     
  12. maxxa05

    maxxa05

    Joined:
    Nov 17, 2012
    Posts:
    186
    I submitted some bugs for them recently, they seem somewhat broken for now.
     
  13. Roni92

    Roni92

    Joined:
    Nov 29, 2013
    Posts:
    225
    yup, their gizmos are bugged too, they don't fit to their transform position when parented, but its not that big deal, compared to what I wrote earlier.
     
  14. Igniuss

    Igniuss

    Joined:
    Nov 4, 2014
    Posts:
    14
    Yeah I noticed that too. I was able to get the gizmos to fit with custom models, but not with regular cylinders, but that's just a small nuance compared to having an actual limit.