-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RigidBody in an Area node with gravity point increases it's speed continuously #30575
Comments
Reproduced with the supplied project on 3.2.1. I'm also having issues with 2D gravity points and orbits not being symmetrical. |
@harvzor Can you elaborate on orbits not being symmetrical (probably with a minimal reproduction project)? I was working on a 2D project and 2D gravity point physics worked as expected. |
I'm still trying to figure this out. The only think I've found is that setting I still have another issue with orbits not being symmetrical. I stripped my project down until the bug was no longer present so I know there's an issue with how I set things up. |
I tested provided project and: Test2: With any value below 0.1 the bug is present (Tested with 0.099) Test3: With value over 0.1 (like 0.2, 0.3, 0.4) there is no bug again So it seems that bug is related to Damping |
This bug is related to Bullet. Switchting to GodotPhysics fixes the problem, |
I've managed to recreate the issue with the orbit not being symmetrical: https://github.com/Harvzor/godot-gravity-test There's also a video on the repo which shows the issue: https://raw.githubusercontent.com/Harvzor/godot-gravity-test/master/godot-gravitytest.webm I've tried tweaking many random settings, including changing the physics engine to GodotPhysics rather than default (Bullet), but the settings don't seem to make a difference. Note that the gravity calculation is done here: godot/servers/physics_2d/godot_area_2d.cpp Line 305 in afeb757
|
As Bullet is removed now, can this be closed? |
@harvzor Can you create a separate issue? |
My issue is more with unstable orbits rather than the speed of objects increasing, so I think it's fair to say it's a separate issue. Created a new issue: #68348 Probably this issue can be closed, though I haven't checked myself that GodotPhysics solves it. At least in my projects, acceleration isn't much of a problem. |
Can confirm this issue does not happen in Godot 4. In Godot 3, it can be fixed by switching to GodotPhysics. Closing this. |
Godot version: 3.1.1
Issue description:
Expected behaviour : A RigidBody inside an Area node with gravity and gravity_point enabled, when not influenced by any other force apart from gravity of the area should not gain momemtum/speed over time.
Current behaviour: RigidBody's speed keeps increasing over time.
Steps to reproduce:
In Project Settings -> General -> Physics -> 3d, set
Default Gravity = 0,
Default Gravity Vector = 0,0,0
Default Linear Damp = 0
Default Angular Damp = 0
Add Spatial node and add Area node as a child, and set
Gravity Point = on
Gravity Vector = 0,0,0
Gravity = 100
Linear Damp = 0
Angular Damp = 0
Add CollisionShape as a child of Area
Set shape as New SphereShape and increase it's radius to a sufficient size like 100
Create a new scene and add RigidBody and add a CollisionShape and MeshInstance as childs
Move the body away from 0,0,0 so it starts orbiting the gravity point.
Add a camera to the scene
Optional - add script to RigidBody to print velocity to confirm.
Minimal reproduction project: GravityBug.zip
Preview
The text was updated successfully, but these errors were encountered: