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

Pull the car to the ground

Discussion in 'Editor & General Support' started by ruslite, Jun 8, 2014.

  1. ruslite

    ruslite

    Joined:
    May 25, 2014
    Posts:
    61
    Hello! How can I make my car pull to the earth as in Need for Speed? Joints?
     
  2. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,605
    Just use a force to push it.
     
  3. ruslite

    ruslite

    Joined:
    May 25, 2014
    Posts:
    61
    How?
     
  4. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,605
    Code (CSharp):
    1.     void FixedUpdate() {
    2.         rigidbody.AddForce(-Vector3.up * 10);
    3.     }
     
  5. ruslite

    ruslite

    Joined:
    May 25, 2014
    Posts:
    61
    I know it. But the car has suspension.
     
  6. ruslite

    ruslite

    Joined:
    May 25, 2014
    Posts:
    61
    The machine must not roll over in the air. How to Need for Speed.
     
  7. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,605
    Dude, that code will push it to the ground.
     
  8. ruslite

    ruslite

    Joined:
    May 25, 2014
    Posts:
    61
    Dude, that code will push it to the ground. But the machine can still spinning in the air! I do not need rotation in the air.