simulate gravity in a 2D game

Is there a way to apply acceleration directly to RigidBody2D.velocity? If not, is there any way to simulate gravity as a gameobject’s velocity?
I am really new to Unity, and I am making a 2D game where you can use direction keys to change the gravity directions. Since the game is multiplayer, using physics2d.gravity might not be applicable.

Hello.

Simulate gravity is not add a velocity to an object. Is to add a force, in this case to the rigidbody component.

This is the correct way to do it, so investigate it and do some tests.

Good luck"!

It is very late for me to answer now, but I just came across the same issue, and was able to fix it
Since Force = acceleration * mass,
when you use AddForce, the object gets acceleration of Force/mass
so if you want to give a specific amount of acceleration, (-9.81 for example), you simply have to multply the force you are sending by the mass of the rigidbody object.

Long story short.

AddForce(rb.mass * GravityVector);

should solve the issue

It is very late for me to answer now, but I just came across the same issue, and was able to fix it
Since Force = acceleration * mass,
when you use AddForce, the object gets acceleration of Force/mass
so if you want to give a specific amount of acceleration, (-9.81 for example), you simply have to multply the force you are sending by the mass of the rigidbody object.

Long story short.

AddForce(rb.mass * GravityVector);

should solve the issue