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] KinematicBody3D Stair-step method works flawlessly in Godot Physics, doesn't work with Bullet #58260

Open
Tracked by #45022
elvisish opened this issue Feb 17, 2022 · 6 comments

Comments

@elvisish
Copy link

elvisish commented Feb 17, 2022

Godot version

3.4.2

System information

Windows 7 64-bit

Issue description

The method I'm using for stair-stepping using PhysicsShapeQueryParameters works almost 99.9% perfectly with Godot Physics (aside edge cases if you're at certain sharp angles and move too little as you can see once in the video at 0:17, but they're almost never going to occur in practice):

2022-02-17.23-36-23.mp4

If I switch the physics engine to Bullet however:

2022-02-17.23-40-01.mp4

it becomes completely unreliable and totally breaks if I make the movement speed too slow and the collider smaller (as seen when crouching). I can only make the body go upstairs when crouched once in that example, and I'm not even sure why it does it that one time (or why it doesn't any other time). Compared to the buttery smooth implementation using Godot Physics, it's unusable.

Unfortunately, Godot Physics is very much broken right now and cannot be used for production until all of the bugs have been ironed out; there are so many game breaking bugs and situations where the collider can get stuck and cannot resolve, it is out of the question to consider using it for anything other than testing.

If it's possible to modify this and make it work with Bullet, I'd be interested in what the problem is as there's definitely problems with both physics engines and with the future of Godot Physics uncertain, it would be wise to resolve Bullet's problems until there is a better solution.

Steps to reproduce

Open the attached project, change Godot Physics to Bullet to experience the difference.

Minimal reproduction project

elv_stairs_new.zip

@akien-mga akien-mga added this to the 3.5 milestone Feb 18, 2022
@Calinou Calinou changed the title Stair-step method works flawlessly in Godot Physics, doesn't work with Bullet KinematicBody3D Stair-step method works flawlessly in Godot Physics, doesn't work with Bullet Feb 18, 2022
@elvisish
Copy link
Author

elvisish commented Apr 5, 2022

Does anyone have any idea what's causing this? I'd like to use this stair-step method with bullet since Godot Physics are completely unreliable for production work, but (I think) bullet's margins cause this to break at low speeds. A compromise (until stair stepping is implemented in kinematicbody) of this working with bullet would be ideal.

@akien-mga
Copy link
Member

I confirm that this is reproducible in 3.5 RC 1, and also reproducible with #56801 merged.

@akien-mga akien-mga modified the milestones: 3.5, 3.x May 19, 2022
@akien-mga akien-mga changed the title KinematicBody3D Stair-step method works flawlessly in Godot Physics, doesn't work with Bullet [Bullet] KinematicBody3D Stair-step method works flawlessly in Godot Physics, doesn't work with Bullet May 19, 2022
@elvisish
Copy link
Author

I confirm that this is reproducible in 3.5 RC 1, and also reproducible with #56801 merged.

Confirmed, still broken in 3.5 RC2. Is this aimed for a 3.6 fix? I'm curious to know what's actually causing the problem (I assume margins that don't exist in GP).

@elvisish
Copy link
Author

elvisish commented Sep 2, 2022

Still broken in 3.5.1-rc1 (try crouching with \ key and going up the stairs, the speed is slower crouching and you can see. Was hoping 64875 might fix it but unfortunately not.

@Riordan-DC
Copy link

I've implemented stepping in Godot and it works with both physics engines. I also wrote a little study on the topic of kinematic controllers. https://github.com/Riordan-DC/Precise3DKinematicController
In the future I'd like to re-implement it in C++. Hope this is useful.

@elvisish
Copy link
Author

I've implemented stepping in Godot and it works with both physics engines. I also wrote a little study on the topic of kinematic controllers. https://github.com/Riordan-DC/Precise3DKinematicController

In the future I'd like to re-implement it in C++. Hope this is useful.

Really interesting, thanks for sharing this (and also for the cc0 licence)!

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

4 participants