-
-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Open
Milestone
Description
Godot version: 3.2 RC 2
OS/device including version: Windows 10 / PC
Issue description: I'm trying to make a game where the gravity changes during runtime. This does not work as expected.
- Changing the gravity in _Ready() works fine
- Changing the gravity in _Process(float delta) just slows the default gravity vector
- Changing the gravity in _PhysicsProcess(float delta) freezes the gravity:
public override void _Ready()
{
// Works as expected
Vector3 lNewGravityVec3 = new Vector3(0,1,0);
PhysicsServer.AreaSetParam(GetWorld().Space, PhysicsServer.AreaParameter.GravityVector, lNewGravityVec3);
}
public override void _Process(float delta)
{
// Just 'slows' the gravity
Vector3 lNewGravityVec3 = new Vector3(0,1,0);
//PhysicsServer.AreaSetParam(GetWorld().Space, PhysicsServer.AreaParameter.GravityVector, lNewGravityVec3);
}
public override void _PhysicsProcess(float delta) {
// Freezes the gravity
Vector3 lNewGravityVec3 = new Vector3(0,1,0);
//PhysicsServer.AreaSetParam(GetWorld().Space, PhysicsServer.AreaParameter.GravityVector, lNewGravityVec3);
}
Minimal reproduction project:
Physics Test.zip
Reactions are currently unavailable
Metadata
Metadata
Assignees
Type
Projects
Status
For team assessment