How to adjust the amount of Gravity

Hi all,

I am new to unity scripting I want to know how to adjust the amount of Gravity that is applied to any object. What I want to do is I have made an object which jumps as soon as I press a key but it does not come down with the same speed.

thank you :smile:
Raviraj

for gravity you need to add regidbody component , and then mass is weight and i forget other one…

Hey thanks

My object already has rigid-body also the
“use gravity” check box is ticked, the problem is that it jumps but takes a lot of time to come down to the ground :frowning: so I want to know if there is any way to set the gravity.

Edit → Project Settings → Physics

2 Likes

Hey thanks earl

but can it be edited after a particular event?

thanks again

I belive it would be possible using the Physics class.

    Physics.gravity = Vector3(0, -1.0, 0);

Code taken from the script reference page:

Edit:
On a sidenote, this would change the gravity for ALL objects in your game.

Hey thanks QueaW

actually I found out about it latter on.

thanks anyways :smile: