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.

https://github.com/godotengine/godot/issues/35713 is possibly related.
I can confirm this on commit https://github.com/godotengine/godot/commit/6fcb58f40dae8228074591e3262d5db97db3e2d7. 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.
The issue is there also on 3.1.2 with Godot Physics backend. (Bullet works fine there)
I ran a Git bisect but only got a commit that's probably not the right one: a9d4cde0f5abc399332dde0c7415b99a5796eb34
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:
scene/gui/texture_rect.cpp: In member function 'void TextureRect::_notification(int)':
scene/gui/texture_rect.cpp:99:14: error: 'struct Rect2' has no member named 'no_area'
99 | if (region.no_area()) {
| ^~~~~~~
(I tried cleaning my build files after every build, it still didn't work.)
Bisect log
# bad: [a34b77e271da5f3d550acfac1e5557f2467c6266] Merge pull request #32095 from KoBeWi/silly_user
# good: [320f49f204cfbf9b480fe62aaa7718afb74920a5] Bump version to 3.1-stable \o/
git bisect start 'a34b77e271da5f3d550acfac1e5557f2467c6266' '3.1-stable'
# bad: [92277d3a2837e71556768e6479e0bff6b69e4031] Merge pull request #29866 from akien-mga/nothing-that-surrounds-us-is-object-all-is-subject
git bisect bad 92277d3a2837e71556768e6479e0bff6b69e4031
# bad: [b0931806c2a085e84ecc4d7989436edc83cd70a8] Merge pull request #28611 from YeldhamDev/popupmenu_regressionmania
git bisect bad b0931806c2a085e84ecc4d7989436edc83cd70a8
# good: [3069095e44d129058f0f4b5e48f81cbbe1bbaf04] Merge pull request #28066 from jbuck3/popupmenu-plugin-id-fix
git bisect good 3069095e44d129058f0f4b5e48f81cbbe1bbaf04
# good: [5fe971145c2bdebf2d68ee3cb3aeb126c7f68e46] Merge pull request #28347 from homer666/tilemap-hide-menu
git bisect good 5fe971145c2bdebf2d68ee3cb3aeb126c7f68e46
# good: [9d42565f81dd7700347ee6da1e67caf5c49bf922] Merge pull request #27763 from maksloboda/priority-improvement
git bisect good 9d42565f81dd7700347ee6da1e67caf5c49bf922
# bad: [a7f00f3bacbb41f35b7120db6a911eda7c6feac9] Merge pull request #28530 from akien-mga/scons-prepend-cpppath
git bisect bad a7f00f3bacbb41f35b7120db6a911eda7c6feac9
# bad: [2cc8848c3c3815c6f72ce5f9b75bfab8a1498292] Merge pull request #26224 from hilfazer/autocomplete
git bisect bad 2cc8848c3c3815c6f72ce5f9b75bfab8a1498292
# skip: [d6b20e854cbca83175e83c2f87e11d406f332005] Merge pull request #27294 from lupoDharkael/rect2i
git bisect skip d6b20e854cbca83175e83c2f87e11d406f332005
# skip: [419022ea8909f26ac4353cc816c553ca14e0b925] Merge pull request #26977 from bruvzg/fix_x11_window_pos
git bisect skip 419022ea8909f26ac4353cc816c553ca14e0b925
# good: [9b86233e324ec117bc73e8a5ac001f46f8140011] Document built-in LineEdit keybindings
git bisect good 9b86233e324ec117bc73e8a5ac001f46f8140011
# skip: [0da61614c050c208166f9f860e61b9f4b9e048bb] Merge pull request #27204 from YeldhamDev/popupmenu_checkicon_offset
git bisect skip 0da61614c050c208166f9f860e61b9f4b9e048bb
# good: [9742d0c323a441036ee7753b85737aa8051714b3] Spatial::look_at() now preserves its scale values
git bisect good 9742d0c323a441036ee7753b85737aa8051714b3
# good: [7e0c97e73b223d28204fc67672ebae157af1f96c] Merge pull request #27656 from Calinou/doc-lineedit-keybindings
git bisect good 7e0c97e73b223d28204fc67672ebae157af1f96c
# skip: [4e230d713487ea540ca534b11d0bdf225617a676] Merge pull request #27148 from YeldhamDev/creatediag_force_guides
git bisect skip 4e230d713487ea540ca534b11d0bdf225617a676
# skip: [712b789dc83f1d6e9279aa7c9368e6dc3ee7a21e] Merge pull request #26897 from rodolforg/fix_spatial_look_at_affecting_scale
git bisect skip 712b789dc83f1d6e9279aa7c9368e6dc3ee7a21e
# good: [82fadde680c9377e0a8da023a66c921174c97aff] Use filename for scene root of imported models
git bisect good 82fadde680c9377e0a8da023a66c921174c97aff
# skip: [0327d57cfd64b40878a79e5b83f4848001fecb4a] Merge pull request #27007 from BastiaanOlij/arvr_notifications
git bisect skip 0327d57cfd64b40878a79e5b83f4848001fecb4a
# good: [6ee5f7c8819847615c5e96ed92a2a86737350459] Merge pull request #27453 from KoBeWi/glhf_scene_root
git bisect good 6ee5f7c8819847615c5e96ed92a2a86737350459
# bad: [e949d6c2ae64a0faecd595b7589c1690426f18a7] Fix build error after #27294
git bisect bad e949d6c2ae64a0faecd595b7589c1690426f18a7
# bad: [f40c62fa29e8b08fe69487efa92fd08a3dea742c] Merge pull request #27371 from ShyRed/fixdisabled2dcollisions
git bisect bad f40c62fa29e8b08fe69487efa92fd08a3dea742c
# bad: [a9d4cde0f5abc399332dde0c7415b99a5796eb34] Allow adding disabled shapes
git bisect bad a9d4cde0f5abc399332dde0c7415b99a5796eb34
# first bad commit: [a9d4cde0f5abc399332dde0c7415b99a5796eb34] Allow adding disabled shapes
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 move_and_slide(velocity, Vector3(0, 1 ,0), true) even if the kinematic body is on the floor. is_on_floor() toggles every frame between true/false as well.
sample with collision debug enabled, looks like the edges of collisionshapes are doing weird things?
A workaround seems to be
velocity = move_and_slide_with_snap(velocity, Vector3(0, velocity.y , 0), Vector3(0, 1, 0), true)
(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 notifications@github.com
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
https://github.com/godotengine/godot/issues/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. move_and_slide_with_snap() does indeed stop jittering on the floor, but any continuous movement in any direction up against a gap between two walls causes the same kind of jitter.
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.
Another suggested workaround: change the vector in move_and_slide() or whatever you have from (X, 0, Z) to (X, -0.1, Z).
Most helpful comment
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
move_and_slide(velocity, Vector3(0, 1 ,0), true)even if the kinematic body is on the floor.is_on_floor()toggles every frame betweentrue/falseas well.sample with collision debug enabled, looks like the edges of collisionshapes are doing weird things?
https://streamable.com/ixwcr
A workaround seems to be
velocity = move_and_slide_with_snap(velocity, Vector3(0, velocity.y , 0), Vector3(0, 1, 0), true)(now i get this weirdness: https://streamable.com/mdr3r )