Search Unity

Feature Request Add new options of physics antigravity suporte

Discussion in 'Physics' started by pauloaguiar, Dec 25, 2022.

  1. pauloaguiar

    pauloaguiar

    Joined:
    May 13, 2009
    Posts:
    700
    could be as a great help in inspector like wellcolider , also method to create antigravity bikes and ships suporte It would facilitate many especially for various types of vehicles, from physics to futuristic antigravity vehicles.
    It would be in addition to whellcollider to also include for antigravity vehicles, I think it would make it a lot easier.
     
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,508
    You may disable Use Gravity in the Rigidbody and apply the gravity acceleration explicitly, for example:
    Code (CSharp):
    1. void FixedUpdate ()
    2. {
    3.     Vector3 gravityAcceleration = Vector3.Up * -9.81f;
    4.     myRigidbody.AddForce(gravityAcceleration, ForceMode.Acceleration);
    5. }
    In this code gravityAcceleration is assigned to the standard earth gravity (9.81 m/s in the Down direction). You may change the sign of the 9.81 and you have a gravity that points Up.
     
    pauloaguiar likes this.
  3. pauloaguiar

    pauloaguiar

    Joined:
    May 13, 2009
    Posts:
    700
    tks