Topic was automatically imported from the old Question2Answer platform.
Asked By
Piece_o_Ham
Old Version
Published before Godot 3 was released.
I would like to set the gravity for all objects in a 3D scene. Is there a way to set the gravity for all objects in a scene without adjusting the gravity scale for each object?
Edit: I was on 2.1 when I asked this. It would still be nice if this could be done per-scene, but this is all I need right now.
Thanks, but my question was regarding 3D physics. I looked at the docs and I found that the code for 3D is almost exactly the same. This works for 3D: PhysicsServer.area_set_param(get_world().get_space(), PhysicsServer.AREA_PARAM_GRAVITY_VECTOR, Vector3(0, -1, 0)). Note that you can also adjust AREA_PARAM_GRAVITY if you just want to pass a scalar. I would suggest editing your question for anybody who reads this in the future