Search Unity

Resolved how to make rigidbody gravity stronger?

Discussion in 'Physics' started by kij_od_miotly, Mar 20, 2023.

  1. kij_od_miotly

    kij_od_miotly

    Joined:
    Jan 27, 2022
    Posts:
    25
    i know that sounds stupid, but a character controller i made following a tutorial somehow slows down the players gravity.
     
  2. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,929
    Just add an acceleration in the opposite direction (generally upwards) to slow it down, or in the same direction (downwards) to make gravity stronger. You can use rigidbody.AddForce for this, passing ForceMode.Acceleration as its second parameter.

    Gravity is just an acceleration, there’s nothing “magical” about it in any engine that would set it apart from any other acceleration. You could even just disable the built-in gravity and implement your own if you wanted to.
     
    Last edited: Mar 20, 2023