0 votes

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.

in Engine by (21 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.