Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Articulated bus physics?

Discussion in 'Physics' started by Obrebski, Jan 15, 2019.

  1. Obrebski

    Obrebski

    Joined:
    Feb 17, 2016
    Posts:
    2
    Hello everyone!
    I'm working on an articulated bus physics in Unity3D (2017.4.1). The bus is made out of 2 parts; the front part, that is the motor, and the back part, that's beeing dragged by the motor. I've added the Hinge Joint component to the back part. Everything seems to work fine, as long as i'm driving forward; when i'm trying to drive backwards, and turn my wheel to turn, the bus stards sliding in the direction of turn, instead of backing up the way it's supposed to. Any suggestions how to implement it so that it behaves like an actual articlated bus?

    View attachment 359389
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,753
    Really you should have ball joint, rather hinge.
    Try use configurable joint.
    There is a chance, your rear wheels don't get traction.
     
    Obrebski likes this.
  3. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,497
    The correct joint is a ConfigurableJoint with all linear motion constraints set to Locked and all angular motion constraints set to Free.

    But as for the video it seems that the rear part is not configured properly. Either the wheels have no sideways friction, or the mass is not in the same scale as the front part (or both).
     
    Obrebski and Antypodish like this.
  4. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,753
    I vote for side way friction. But along with mass, thyey may play critical role.
     
    Obrebski likes this.
  5. Obrebski

    Obrebski

    Joined:
    Feb 17, 2016
    Posts:
    2
    Thank you guys! I will let you know what fixed the issue :)