-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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] KinematicBody jitters up and down when walking along a flat gridmap. #35780
Comments
I can confirm this on commit 6fcb58f. This also occurs when switching to Godot Physics. In fact, it's even more noticeable with Godot Physics (it'll start happening before you even move the cube, unlike Bullet). Can you reproduce this on any of the earlier 3.2 alphas, betas and RCs? You can download them here. |
It's the same on alpha0. |
I ran a Git bisect but only got a commit that's probably not the right one: a9d4cde Instead of jittering, the KinematicBody will freeze entirely upon touching the ground and won't move anymore at all (even if you press movement keys). I had to skip many iterations due to several commits not building due to:
(I tried cleaning my build files after every build, it still didn't work.) Bisect log
Edit: Reverting that particular commit doesn't solve the issue; the KinematicBody still jitters around heavily. |
Confirmed to still be a problem on bullet engine for me. Seems fine if the floor is exactly level, but I think my gridmap floors might be on a very slight incline. The y component is not removed when I call sample with collision debug enabled, looks like the edges of collisionshapes are doing weird things? A workaround seems to be (now i get this weirdness: https://streamable.com/mdr3r ) |
In the Kinematic Character 3D Demo I only have the jittering when the player cube is between two or more floor cubes. On a flat mesh there is no jitter for me. What GPU is everyone running on? Win7 with an Nvidia 1080ti here. |
@Two-Tone I'm using a GeForce GTX 1080 on Fedora 31. |
So that rules out it being an AMD issue then.
…On Sat, Feb 1, 2020 at 2:51 AM Hugo Locurcio ***@***.***> wrote:
@Two-Tone <https://github.com/Two-Tone> I'm using a GeForce GTX 1080 on
Fedora 31.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#35780?email_source=notifications&email_token=ABBEISYR64OBMMYXO552TTLRAUZYBA5CNFSM4KOGRYHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKQX6XQ#issuecomment-581009246>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBEIS4DNW73DBRJ6SC33VLRAUZYBANCNFSM4KOGRYHA>
.
|
Maybe related? #34436 |
This looks a great deal like issue 34596 where user @madmiraal listed a number of duplicate issues which hopefully can lend even further insight. As stated previously, this happens in GodotPhysics (but not Bullet) since 3.1. The jittering occurs in both physics backends as of 3.2 after 6dd65c0. I am currently on Win10 with a GTX 1060. |
#40377 fixes it for GodotPhysics (but not for Bullet). |
Another suggested workaround: change the vector in move_and_slide() or whatever you have from (X, 0, Z) to (X, -0.1, Z). |
This worked on me. Godot 2.32 - capsule/sphere vs cube collision edges. Im not sure WHY and how. But it solved it. Thanks |
I can confirm the issue in Godot 3.3.3, but also 3.4, and it happens not only with Bullet physics but also when setting the physics engine to GodotPhysics. Ping @akien-mga as you said it was fixed for the latter. This may be a regression? Happens in our latest project. Here's a minimal test demo (you can move forward by pressing A, the bumps should be noticeable): |
I tested your project, I can reproduce the issue with Bullet, but not with GodotPhysics. I see no bumps with GodotPhysics in Godot 3.3.3-stable, 3.4-beta1 through 3.4-beta4 and latest The bumps in Bullet are subtle but noticeable, but in GodotPhysics I really don't see any. To be sure, I only go forward/backward in the initial position and make sure that the intersection between the left or right edge of the floor and the bottom of the window does not move. It seems like you changed the 2D engine from "DEFAULT" to "GodotPhysics", not the 3D one. Maybe that's the issue? |
Ah! I didn't know there were separate settings for 2D and 3D. Indeed it's only bullet physics then! |
I have also encountered this issue. I can confirm that it only happens on Bullet physics and GodotPhysics solves it. I made a test project which shows the issue with using Bullet and GridMap collision, and the effect is quite extreme jitter, very noticeable. Maybe that will help debug the problem. |
Will there be a fix for Bullet in 3.x? |
It depends on whether a contributor finds a fix for it. I think @pouleyKetchoupp investigated this a while ago, but he didn't find a solution to this bug. |
In case anybody would like to contribute on this topic: The best way to fix most of these Bullet specific issues with KinematicBody would be to rework the code for |
As mentioned in Shifty's Godot Character Movement Manifesto, the
In other words, create a function that wraps |
#56801 seems to solve this issue, together with a handful of related Bullet bugs which were all regressions from the same change. I tested the Kinematic Character 3D demo and confirmed that it's fixed by #56801. Note that the current version of the demo uses 120 FPS for physics to work around the issue - it can now be reverted back to 60 FPS after #56801 and the demo would run fine. (I tested both the current version with 60 FPS and the old version from when this issue was opened, both are fixed). @NathanLovato's MRP is fixed: #35780 (comment) @cybereality's MRP is not fixed in my test: #35780 (comment) |
That's great news, thanks much for the fix! |
Fixed by #56801. |
Bullet still bumps on gaps in gridmaps in 3.5 RC1, doesn't do it with Godot Physics. |
That's normal, #56801 was merged after 3.5 RC 1. It will be in 3.5 RC 2. |
Still having issues in RC2 with this, if the KB is moving slow enough, it'll jitter on the gridmap seams. It does not do this with Godot Physics. It only seems to happen if gravity is being applied to ground, or if the KB is walking into a wall while sliding along it. |
I would suggest opening a new issue for cases which are not solved yet. |
Done: #61616 |
Note: This issue has been confirmed several times already. No need to confirm it further.
Godot version:
3.2 stable
OS/device including version:
Windows 10
Issue description:
KinematicBody jitters up and down a lot on edges of tiles of a gridmap.
Steps to reproduce:
Minimal reproduction project:
Kinematic Character 3D Demo from the templates has this bug easily noticeable.
#35713 is possibly related.
The text was updated successfully, but these errors were encountered: