Attention | Topic was automatically imported from the old Question2Answer platform. | |
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.