Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Hey, need help with wheel joint 2d

Discussion in '2D' started by ShadowZie, Jun 11, 2023.

  1. ShadowZie

    ShadowZie

    Joined:
    Nov 5, 2017
    Posts:
    70
    Hey, I have 4 2d cars all of them have the same settings on the wheel joint and rigid body but still some cars are slower why?
    racer #1 for some reason is slower than the other ones even tho he has the same speed
    and racer 4# is faster

    what should I change? in order for all of them to be at the same speed


     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,468
    If you're using the joint to move the body then it's relying on contact friction of the material you're using. Beyond that, when it applies a force it'll be inversely proportional to the mass; if you're using auto-mass option on the Rigidbody2D then they'll potentially have a different mass.

    The speed isn't linear speed though, it's just how fast those (CircleCollider2D?) are rotating so friction and mass and the time-in-contact with the "ground" are the only potential differences beyond differences in WheelJoint2D configurations.

    Beyond that I couldn't guess.
     
  3. ShadowZie

    ShadowZie

    Joined:
    Nov 5, 2017
    Posts:
    70
    Thank you :)
    they have the same mass But I will play with the tine in contact with the gound and with the speeds I hope to get them right :)
    thank you