Huge physics problem of Godot 4
Asked Answered
E

10

0

Our team is porting the game from Godot 3.5 to Godot 4. We have discovered a huge physics issue in Godot 4. When a character collides with a concave body, there is a catastrophic performance degradation. This is especially pronounced when colliding with sharp corners.
You can watch it on video. I checked many times that the problem lies precisely in physics. Godot 3 didn't have this problem.

Eparchy answered 20/2, 2023 at 10:0 Comment(0)
H
0

Then assuming you haven't yet you should definitely open an issue on the tracker. Though typically one should search first to see if an issue is already reported. A quick search brought me to this(note the milestone on this is marked as 4.0):
https://github.com/godotengine/godot/issues/57313

If you think it might be the same issue, perhaps add a reaction such as thumbs up to it and follow the discussion there, maybe you find you have some further feedback to offer.

Heather answered 20/2, 2023 at 10:20 Comment(0)
E
0

Heather Thank you. I've added a description of the problem to this ticket.

Eparchy answered 20/2, 2023 at 10:38 Comment(0)
M
0

Godot 4 is a pretty vague term, there are multiple versions, could you tell us if you're in beta or release candidate?

Megrims answered 20/2, 2023 at 15:31 Comment(0)
E
0

Megrims RC 2

Eparchy answered 20/2, 2023 at 18:18 Comment(0)
M
0

Eparchy Definitely do what Ruby posted then and submit an issue, I was just wondering because there are a lot of changes happening right now and I've suddenly found myself having issues and then updating and it all magically fixes itself next version.

Megrims answered 20/2, 2023 at 22:9 Comment(0)
A
0

Godot 3.x used Bullet Physics (by default) and Godot 4.0 dropped that for a custom physics engine (which I don't understand why, but okay).

However, Godot Physics is not as fully featured as Bullet and seems to be somewhat unfinished.

If those objects are static bodies, you are better off using "Make multiple convex siblings". Concave physics objects were always a little slow anyway, so I've been doing that for a while.

Armitage answered 20/2, 2023 at 23:58 Comment(0)
E
0

Megrims I sent a case test and video instruction in Git. I'm duplicating it here.

Test scene
https://github.com/godotengine/godot/files/10790667/test_level.zip

Test video showing how to get catastrophic performance degradation. To get the effect, you need to go into the wall in the indicated areas. Any monster stuck in such places makes the game impossible to play.

Eparchy answered 21/2, 2023 at 9:21 Comment(0)
L
0

I also reported this one last year: https://github.com/godotengine/godot/issues/70453 - interesting to see the issue in action in your game.

I also have two other similar physics Issues reported:

Summary: Godot 4.0 Physics is mostly beta for 3D as of now. Right now I'm starting experimenting with implementing Bullet with GDExtension.

This tweet didn't age well 😅 - as Godot 4 physics is far away from being usable for the majority of 3D use cases, compared to Bullet. I know things will be improved, but probably only next year? Since this is no small task.

Leishmaniasis answered 5/4, 2023 at 17:50 Comment(0)
L
0

Leishmaniasis Right now I'm starting experimenting with implementing Bullet with GDExtension.

UPDATE: I won't move forward with this, since there's a WIP Jolt GDExtension extension that is almost done:

https://github.com/godot-jolt/godot-jolt

UPDATE 2: Nice! https://github.com/godotengine/godot/pull/65427

Leishmaniasis answered 5/4, 2023 at 17:56 Comment(0)
L
0

An alternative would be to add Bepu Physics engine (pure C# open source) as well.

I'm sure it is a lots of work but if it's already better than a pretty incomplete own implementation, it might be better after all.
I have played a lot with it while I'm messing around with XNA/MonoGame and I never have lags and demo are pretty impressive.
The only concern was the lack of auto creation of physics bodies from 3D models, that is a serious pain, especially doing it by hand, calculate every primitives location, orientation and size.

Lather answered 5/4, 2023 at 18:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.