Skip to content
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

[Bullet] Problems with physics in 3D when using the units as intended #30742

Closed
Tracked by #45022
MightyPrinny opened this issue Jul 21, 2019 · 8 comments
Closed
Tracked by #45022

Comments

@MightyPrinny
Copy link
Contributor

MightyPrinny commented Jul 21, 2019

Godot version:
3.1 stable

OS/device including version:
GNU/Linux

Issue description:
Working at the scale Godot is expecting for 3D models, which is 1 unit = 1 meter, causes problems with physics, specially with Godot Physics, I'd like to avoid bullet because Godot Physics feels more precise, however it starts working well when my character is 4 meters tall, I was previously using a 1 meter tall character and also tried making it 2 meters tall but the physics weren't precise enough for me.
Working with bigger numbers seems ok(I hope this is the case), but then other parts of the editor cause problems, the automatic texture size for baked lightmaps are too big(I couldn't even see the progress bar move when I tried to bake a lightmap for a low poly level scene), the camera's default values are very off and probably other things have bad default values too which is a bit annoying, and I can only hope there aren't any performance issues for whatever reason.

I think there should be a way of making physics more precise while working with models that use the intended scale or maybe there could be settings to change the scale of the units so we can make 1 unit = 0.5 meters on a project if we want.

Update:

The problem I was having was mostly because of a generated trimesh collision shape, however there's still a less important precision problem that causes objects to move a bit into the ground when they move, here's a project with the code I'm using, in this case the camera moves with the player so it's easier to notice, this only works with Godot Physics and this is why I think it's more precise than bullet, in bullet the objects slide down slopes event though I'm using move_and_collide which makes them climb slopes slowly and go down slopes very fast.
3DKinematicTest.zip

@aaronfranke
Copy link
Member

Can you provide a minimal reproduction project and point out what to look for?

@MightyPrinny
Copy link
Contributor Author

MightyPrinny commented Jul 23, 2019

I was making a test scene and found out that the generated trimesh collision for the map was the cause of most problems, now the character only looks like it moves a bit into the ground while it's moving probably because of my ground snapping code, and I also found that raycast nodes somehow collide with objects that have their collision shape disabled.

@eon-s
Copy link
Contributor

eon-s commented Jul 23, 2019

Check if the problem appears on master (compile or get a daily build), some issues with trimesh and disabled shapes were solved already.

@Calinou
Copy link
Member

Calinou commented Dec 23, 2019

@MightyPrinny Can you still reproduce this on 3.2 beta4?

@MightyPrinny
Copy link
Contributor Author

I think godot physics works well enough, but bullet is still weird.

@KoBeWi
Copy link
Member

KoBeWi commented Nov 19, 2020

Looks still valid in 3.2.4 beta2

@aaronfranke
Copy link
Member

@MightyPrinny Have you tried decreasing the margin value?

@pouleyKetchoupp pouleyKetchoupp changed the title Problems with physics in 3D when using the units as intended [Bullet] Problems with physics in 3D when using the units as intended Jan 15, 2021
@akien-mga
Copy link
Member

No answer, and I don't really understand what the bug was from the way it's described. I tried the MRP and didn't really understand what was supposed to be the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants