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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

WheelJoin2D and CircleCollider2D

Discussion in 'Scripting' started by johnnydj, Aug 4, 2014.

  1. johnnydj

    johnnydj

    Joined:
    Apr 20, 2012
    Posts:
    211
    I'm building a Hill Climb Racing type game and I'm trying to achieve a burnout effect when accelerating with the car. So far, even if my acceleration is very high, the car will start moving fast and the wheels just rotate fast, instead of doing a small burnout before actually doing a grip.

    Anyone able to assist with this? If it's possible to achieve it with 2D stuff.
     
  2. sandipan4cse

    sandipan4cse

    Joined:
    Aug 25, 2013
    Posts:
    31
    Use hinge joint instead of wheel joint :)
     
  3. johnnydj

    johnnydj

    Joined:
    Apr 20, 2012
    Posts:
    211
    thanks, I tried using HingeJoint2D it but I still get the same behavior :(
    Using HingeJoints, I also loose the ability to use JointSuspentions.
    Any ideas of what settings could give that effect?
     
    Last edited: Aug 4, 2014
  4. sandipan4cse

    sandipan4cse

    Joined:
    Aug 25, 2013
    Posts:
    31
    Use material in wheel. which will give bouncy effect.
     
  5. johnnydj

    johnnydj

    Joined:
    Apr 20, 2012
    Posts:
    211
    btw I'm also using CircleCollider2D and not Wheel Collider, since I'm trying to keep it 2D
     
  6. sandipan4cse

    sandipan4cse

    Joined:
    Aug 25, 2013
    Posts:
    31
    I think rigidbody2D attached with those wheel sprite.
    use physics material in that rigidbody2D.
     
  7. johnnydj

    johnnydj

    Joined:
    Apr 20, 2012
    Posts:
    211
    the bounciness isn't really my problem. it's about trying to achieve that burnout effect on the wheels when starting from stationary position, or when climbing some hills.
    But I'm afraid I can't achieve that without using WheelColliders. But for that I would have to convert everything to 3D rigidbodies and colliders :(