Godot-v4.0.2 physics. Is a set of two connected bodies unstable?
Asked Answered
O

10

0

Hello!

I've run into an issue with Godot 4.0.2.stable physics. I make sets of bodies connected with fixed joints. It used to work in Godot3 Bullet and was always stable. In Godot 4 it always blows up after a few seconds of simulation, see the attached video. It doesn't matter what I do. I tried increasing integration frequency, increasing/decreasing linear/angular softness. Also, softness seems to be very sensitive, as soon as it differs from the default value, the system blows up much faster.

In advanced physics settings there is a switch DEFAULT/GodotPhysics3D. I guess, it doesn't do anything as Bullet has been removed from the codebase?

Is there a way to make it work? Or I'm doomed to revert back to Godot3?

See the video:

Otten answered 12/4, 2023 at 6:26 Comment(0)
C
0

I'm not surprised. Godot Physics is very much unfinished and not as good as Bullet.

Still unclear to me why they removed Bullet (their official answer doesn't make sense, as Bullet is very solid and was used in games like GTA4).

Comminute answered 12/4, 2023 at 7:42 Comment(0)
C
0

Otten Or I'm doomed to revert back to Godot3?

You can check third-party physics support.
Godot Jolt

Corydalis answered 12/4, 2023 at 15:30 Comment(0)
C
0

Corydalis Godot Jolt

It's worth noting:

⚠️ Godot Jolt is still unfinished and not ready to be used in a production environment.

Nor is there yet a pre-built binary release, so to test it's current state one would likely have to build it from source. But it is an exciting development and I'm certainly looking forward to it. πŸ™‚

Capri answered 12/4, 2023 at 15:59 Comment(0)
U
0

Is there any way to set the bullet physics back? Perhaps someone is developing a plugin?

Used answered 12/4, 2023 at 15:59 Comment(0)
O
0

Comminute I'm not surprised. Godot Physics is very much unfinished and not as good as Bullet.

Still unclear to me why they removed Bullet (their official answer doesn't make sense, as Bullet is very solid and was used in games like GTA4).

Exactly! When people say that it's primarily for robotics, it is NOT true. Bullet is designed for games. Bullet as-is and its derivatives are used all over the place. It is not capable to reliably drive motorized joints without producing jitter as it uses classic ERP/CFM velocity-based solver. That's the reason why Ervin Coumans implemented Featherstone sub-module (Lagrange equations in generalized coordinates) in Bullet, to be able to use Bullet/pyBullet for robotics also when he joined Google to run reinforcement learning experiments! But it is only the Featherstone sub-module which suits robotics, not the rest of the Bullet engine!

Yep, will definitely have to check that one out. I really need Godot4 shader/material/networking/gd-script improvements. It is so much less pain compared to Godot3. Don't want to give up just yet.

Used Is there any way to set the bullet physics back? Perhaps someone is developing a plugin?

That would be awesome! Is there a chance that copy-paste from Godot3 to Godot4 with syntax adjustments may work? If I understand it correctly, Godot3 physics is a module, at least it is located in /modules subfolder, and Bullet codebase itself is in /thirdparty. Right?

Otten answered 12/4, 2023 at 16:6 Comment(0)
B
0

Yeah they should've kept Bullet in until Godot's own api is bulletproof. Pun intended. Bullet's c++ interface, imho, is nasty and pathologically object-oriented πŸ™‚, but the engine itself does the job well.

Bathypelagic answered 12/4, 2023 at 16:12 Comment(0)
O
0

Bathypelagic

Bathypelagic Bullet's c++ interface, imho, is nasty and pathologically object-oriented πŸ™‚

Everything is relative. Bullet internals is a perfection in comparison with NVidia PhysX4's under-the-hood stuff πŸ™‚

Otten answered 12/4, 2023 at 16:23 Comment(0)
C
0

Otten Is there a chance that copy-paste from Godot3 to Godot4 with syntax adjustments may work? If I understand it correctly, Godot3 physics is a module, at least it is located in /modules subfolder, and Bullet codebase itself is in /thirdparty. Right?

Developers rarely drop in here, but it's probably possible to implement Bullet through GDExtension.

Corydalis answered 12/4, 2023 at 19:11 Comment(0)
O
0

Corydalis possible to implement Bullet through GDExtension.

I was asking more along the lines of how different the module API for physics server is (didn't look into it myself yet). Because when I was porting over my own C++ modules, there were not really that many changes between 3 and 4.

It's mostly Quat->Quaternion; Spatial->Node3D, ... etc. The only significant change I noticed so far is inheritance of C++ methods in gd-script now must be expicitly allowed on C++ side by declaring method with no implementation
and overridable.

Otten answered 12/4, 2023 at 19:49 Comment(0)
O
0

Otten
Now I understand, why the developers don't want to throw Bullet back in. Naively thinking that it should be mostly some mechanical work renaming a few things here and there I copied "/3rdparty/bullet" and "/modules/bullet" from 3.5.2 to 4.0.2. Last week all I've been doing every single night is fixing API incompatibilities. And there is still no end to that.

Just for contrast, I've been porting a C++ plugin from Unreal4 to Unreal5 some time ago. Can anyone guess how many incompatibilities I had to fix?.... It was exactly 0! Unreal did something with all the assets. But the C++ code went from 4 to 5 as-is. No changes were necessary πŸ™‚

Otten answered 17/4, 2023 at 0:54 Comment(0)

© 2022 - 2024 β€” McMap. All rights reserved.