-
-
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
KinematicBody2d move_and_slide function, The value returned by a collision at a particular location is not normal #25967
Comments
Can't do anything without an actual project to test on. |
@akien-mga I've uploaded dome |
Yeah, this seems like the same issue I just posted about in #30509, thanks for referencing it @myhalibobo. Thanks also for uploading the minimal example. |
Still valid in 58f5c2b |
I can confirm #42574 fixes the issue (broken in 3.2.3.stable) in the 3.2 branch. |
Yes, you can probably construct an infinite number of extreme cases where the physics engine breaks. |
Not sure what makes this a particularly extreme case, not that it should necessarily be invalidated even if it was. The velocity isn't that fast(just 8 pixels horizontally and vertically per frame), the angle of approach is just 45 degrees, and aside from one y-value of 292.05, all positions and extents are whole numbers.
Did test that out, and yes the tscn version somehow works with this for some reason. Doesn't actually fix the bug though, because just changing the y-value from 292.05 to 300 gives this in 3.2.3 stable. Which means that now all values are whole numbers, so this would actually show up more readily if you make a game with objects that try to stick to a grid. This version of the test case is not broken on #42574 though. |
These changes revert the part of godotengine#42576 that was skipping rest info checking when no collision occurred in the motion check. That allows to make floor detection consistent by checking for rest info even if there was no collision during the motion (godotengine#45259). On the other hand, one-way collision need another fix in order to avoid inconsistencies between motion check and rest info check that causes bugs like godotengine#25967. This is done by restoring valid_depth in rest info check and set it the same way as in motion check. Also making minor changes in _rest_cbk_result in order to early exit by doing depth tests first, before extra calculations for normal checking. Fixes godotengine#45259
Godot version:3.1 beta4
Platform:win7
As shown in the figure below, now that my character is jumping up, and the character and platform are in this particular position, my velocity (-800,-484), at which point the character should have moved up.But move_and_slide() returns velocity(-800,0). This is incorrect.This should be a special case
Link to minimal example project:
New Game Project.zip
The text was updated successfully, but these errors were encountered: