[Bullet] 3D RigidBody collisions with static collision shapes still bumpy
bluecorn745 opened this issue · 8 comments
Godot version:
3.2.2-stable, 3.2.3-stable, edit: 3.2.4rc3, 3.1-stable
OS/device including version:
Windows 10 20H2, Kubuntu 20.10
Issue description:
When sliding a RigidBody in character mode over a flat static terrain, most often it will bump up into the air at the "shape boundaries"-- e.g. the edges of individual triangles in a trimesh, or the edges of convex shapes, but not the edges of BoxShapes. Much less frequently the RigidBody will get stuck on the edge. The bumpy collision will slightly change the direction of motion as well, for example, I'll be trying to go straight forward but end up 10 degrees or so towards the right. What I expect to see is the RigidBody being able to slide across a flat surface in a straight line.
I've only seen this behavior when using Bullet. (When I switch to GodotPhysics the collision boundaries still seem broken, but in a different way so that's beyond the scope of this issue).
I know this is very similar to #21341, but I'm still having this problem. Increasing the physics step as mentioned there helped slightly but did not eliminate the issue, and I've been using the "smooth trimesh collision" option as well. Hoped this might be fixed in 3.2.3, but having the same issue in both 3.2.2 and 3.2.3.
Steps to reproduce:
- Enable "visible collision shapes" in the editor
- Create a flat terrain out of trimesh (Many ways to do this, I used a GridMap to repeat a cube shape).
- Add a RigidBody in character mode that can be moved around using the keyboard.
- Don't forget to add a camera :)
- Run the scene and observe the bumpy behavior.
Minimal reproduction project:
IsPhysicsFixed_3_2_3.zip
Make sure "visible collision shapes" is checked. Arrow keys to move, space to jump. Orange is planes with trimesh, red is cubes with trimesh, yellow is cubes with convex shapes, and green is cubes with BoxShapes.
@bluecorn745 Can you test this in 3.2.4rc3?
hello I tried it and if the same problem with 3.2.4 rc3 and rc4
@Calinou Yeah, I don't know how to get rc4 but got the same results as drcucaracha in rc3. No change that I could tell.
This issue persists in v3.4.stable.official [206ba70f4]
Same for 3.4.3 RC 2.
I just found out about "physics/3d/smooth_trimesh_collision" and it solved the problem for my project. But as op already said, it will not solve this issue.
I downloaded Godot_v3.4.3-rc2_x11.64 and found the smooth_trimesh_collision option that Smarty mentioned. It didn't help for my project. The only thing that somewhat mitigates this issue is jacking physics frames to 240. Upping the frames also introduces new problems in physics, and would require a rewrite of my scripts (not to mention increasing hardware usage). I can also report that this problem is slightly less noticeable using Godot Physics instead of Bullet, but it's still there.