godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.93k stars 21.15k forks source link

[Bullet] KinematicBody3D with move_and_slide() can stop moving completely even when the given velocity is not equal to zero #45058

Open archerallstars opened 3 years ago

archerallstars commented 3 years ago

Godot version:

OS/device including version:

Issue description:

I move a KinematicBody3D with velocity input to the move_and_slide() using the Bullet/default physics engine. But after a while, the KinematicBody3D stop moving completely even though the given velocity is not equal to zero, as shown in my screen recording below:

https://user-images.githubusercontent.com/1403194/104109159-d4519880-52a9-11eb-897c-97f6372b402d.mp4

And when I checked the is_on_floor() output, it did not always return true even though the KinematicBody3D was always on the floor with the gravity applied to it on every physics frame, as shown in my screen recording below:

https://user-images.githubusercontent.com/1403194/104109200-5215a400-52aa-11eb-850e-e9b1d01f1b8d.mp4

I am not sure whether this issue is related to #33833 in some way.

Steps to reproduce:

  1. Open the reproduction project.
  2. Choose the appropriate Vector 3 Print in the Player's script available at the inspector tab.
  3. Run the project, the Player will stop moving entirely.

Minimal reproduction project:

test.zip

nonunknown commented 3 years ago

duplicate of #45060

archerallstars commented 3 years ago

duplicate of #45060

I don't think it's a duplication since the issue relates to a completely different physics engine (Bullet vs GodotPhysics).

Moreover, the behaviors related to the issue are completely different as one completely freezes and unable to detect the floor while the other has none of these behaviors.