Search Unity

Wheelcollider need a new change for the future!

Discussion in 'Physics' started by MrRobinOfficial, Oct 22, 2019.

  1. MrRobinOfficial

    MrRobinOfficial

    Joined:
    Jul 15, 2017
    Posts:
    13
    Hello, my name is Robin Johannesson. I'm working on a project with car physics. And I notice that your Wheelcollider has multiple issues.

    1. Wheelcollider is facing world direction, not object's direction. Meaning most of the time it will face the wrong way.

    2. Is complicated to use. For example wheelcollider's animation cruves of friction is not well done. The creator has no indication, what curve will exactly have effect on.

    3. Is not simple enough. For this project, I wanted to create a car that could drift. However, it was really hard to make guesses with friction curves. Make realistic or arcade templates for the car to choose, to make it more simpler. If it would be realistic, the tire tread pattern, would give more traction and less friction

    4. Side node, please also introduce raycast with a wheel shape in 3D Physics. (Currently I'm using multiple raycasts to handle this, but this would be much easier with updated wheelcollider or new raycast shape).

    Thank you for reading this. Have a wonderful day, Robin.
     
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    Hi, and welcome to Unity forums!

    I couldn't agree more with you. However, the WheelCollider component is provided by nVidia PhysX:

    https://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/guide/Manual/Vehicles.html

    It is my personal opinion that the PhysX Vehicles model is based on a wrong approach and contains significant implementation flaws. That causes many issues such as those we all are experiencing in Unity. But Unity can only expose what comes with PhysX, so we must live with it.

    On your point 1: the WheelCollider always faces the forward direction of the Rigidbody it belongs to, regardless the orientation of the WheelCollider's transform. If the rigidbody rotates the WheelCollider will follow it.

    About your point 4, that is something that is already available in PhysX but hasn't been exposed in Unity yet:

    https://docs.nvidia.com/gameworks/c...l/Vehicles.html#wheel-contact-beyond-raycasts
     
  3. pauloaguiar

    pauloaguiar

    Joined:
    May 13, 2009
    Posts:
    700
    I found a you tube tutorial how to create a custom wheels collider : here
     
  4. MrRobinOfficial

    MrRobinOfficial

    Joined:
    Jul 15, 2017
    Posts:
    13
    I know, I'm going after her tutorial as well. But still. + She is not finished with her serie. She going through another person code. And She also simplifier the code as well, not using multiple raycast. Sorry, but I researched too far, then you could imagine. Maybe 8-13 months of research, and still stuck on the wheels acts as a drift car with real friction.
     
  5. MrRobinOfficial

    MrRobinOfficial

    Joined:
    Jul 15, 2017
    Posts:
    13
    Thank you for the answer. I also know that there is some asset on Unity Asset Store, that can help the project. However I wanted to make this project for free (see how far I can go. Sometimes is bullshit that you need to pay for create a game, that should obviously be free).

    Is ashemd nvidia dosen't update their wheelcollider. I belived it was introduce back at 2011, and they have not made any big progress since this. :/
     
  6. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    There are are couple of free vehicle packages in the Asset Store:
    https://assetstore.unity.com/packages/tools/physics/vehicle-physics-pro-community-edition-153556
    https://assetstore.unity.com/packages/tools/physics/ms-vehicle-system-free-version-90214

    They won't. They're convinced their vehicle model and implementation are perfectly fine. For many cases it is, but when you want to simulate something beyond boxes and cylinders, you hit the "by design" problems.