Godot v3.2.beta5: Changing global gravityvector during runtime

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By gyrosp

Hello everybody,

I’m trying to change the global gravityvector during runtime but it does not work.
I have a very simple 3D-Scene with some RigidBodys which all fall down when I start the project.

I now added following script to the parent Spatial node:

public override void _PhysicsProcess(float delta) {
    Vector3 lNewGravityVec3 = new Vector3(0,-1,0);

    PhysicsServer.AreaSetParam(GetWorld().Space, PhysicsServer.AreaParameter.GravityVector, lNewGravityVec3);

When I now start the project the physics are frozen. What am I doing wrong? I’m setting the gravity to the default value and even though the physics freeze.