Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question WheelCollider when vehicle has articulated steering

Discussion in 'Physics' started by bjornsyse, Mar 1, 2023.

  1. bjornsyse

    bjornsyse

    Joined:
    Mar 28, 2017
    Posts:
    102
    Hi

    I've tried the wheel colliders in a few setups where the `steerAngle` is used to handle steering. But I've failed in setting up an articulated vehicle where wheel is fixed but the entire axis /chassis part rotate instead.

    I've tried two rigid bodies linked with a hinge joint and then wheel colliders only driving on them both, not succeeded with that approach yet.

    Anyone else have better approach/idea?

    https://en.wikipedia.org/wiki/Articulated_vehicle

     
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,478
    That's the correct approach. I've set up a few vehicles like that. I've used a CustomizableJoint instead of a HingeJoint, but the later is just an use case of the generic CustomizableJoint.



    However, I'm not sure if/how standard WheelCollider components will work with that setup. This is an use case the designers of the wheel component never had into consideration. In the above example I'm using WheelCollider components for suspension only, with tire frictions and wheel rotations handled via custom code (Vehicle Physics Pro).
     
    Last edited: Mar 6, 2023
    bjornsyse likes this.
  3. bjornsyse

    bjornsyse

    Joined:
    Mar 28, 2017
    Posts:
    102
    Ok, thanks for letting me know! I'll continue on that track then and perhaps checkout Vehicle Physics pro!
     
    Edy likes this.
  4. bjornsyse

    bjornsyse

    Joined:
    Mar 28, 2017
    Posts:
    102
    Hi again

    I was just about to try the VPP and set this up for a test, but coulnd't find the `VPVehicleJoint` mentioned in the documentation. Is it not included in the community edition?

    Would a similar setup be possible in Edy's Vehicle Physics too btw?
     
  5. bjornsyse

    bjornsyse

    Joined:
    Mar 28, 2017
    Posts:
    102
    Found answer to my first question now, that VPVehicleJoint is not included in the community Edition.
     
  6. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,478
    No, it wouldn't. In EVP all wheels expect to be attached to the same Rigidbody, so they wouldn't handle the motion of the articulation properly.
     
    bjornsyse likes this.