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

Regression in KinematicBody2D.move_and_slide where slide is instable and body sometimes bounce up for few frames #46134

Closed
lukaszbulzacki opened this issue Feb 17, 2021 · 1 comment · Fixed by #46148

Comments

@lukaszbulzacki
Copy link

Godot version:
324rc2

OS/device including version:
Windows 10

Issue description:
When KinematicBody2D.move_and_slide is used body sometimes bounce (disconnects from ground) for few frames.
Whole logic is in _physics_process.
It is observable when vector size is chaning constatly.
In test case you Vector2 is constantly pointing same direction but its length is changing constantly.
Sometimes it is Vector(100.0, 100), Vector2(25.8, 25.8), Vector2(42.3, 42.3), Vector2(43.1, 43.1), etc.
When you try to see slide collision count you will see the numbers will be changing between 0, 1, 2 when body is sliding.
In previous versions (3.2.3 stable) it worked like slide collision count was 1, 2 (zero was not visible because object was in constant touch with ground).
SlideRegression__GODOTv324rc2.zip

Doesn't metter if implementation is in GD or CS.

Steps to reproduce:
Look into minimal project.
Just run it and when body will be sliding on ground it will sometimes bounce for few frame.
Look into Log panel in godot where "get_slide_count" is printed - you will see 0 0 0 1 1 1 2 02 1 0 10 0111000.

Minimal reproduction project:
SlideRegression__GODOTv324rc2.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants