-
-
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
Inconsistent floor collision #24050
Comments
In any case, recreating the tileset with correct (integer) numbers does NOT fix the "floating player" issues. godotengine/godot#19956 and godotengine/godot#20290 should be investigated further. Signed-off-by: Stuart "Sslaxx" Moore <[email protected]>
I suspect this is due to the way you check collisions with the ground (and how it affects the player's velocity) though it's hard to tell without any code. Edit: I just saw there's a github repo and at first glance it seems my assumption is right. You'll have to correct the player's position or velocity when landing since physics works in discrete timesteps and the player will not always be at the same y-position when you detect hitting the ground. |
Might be related to #23675 if you're using stop_on_slope EDIT: Oh yeah this is 3.0.6 so it isn't that issue. |
he's on 3.0.6 so it still uses the functional slope_stop_min_velocity Anyway I think it's your collision checking code that's broken. |
This is quite possible. The existing code doesn't use any of the features like The entire movement and collision code is going to be re-written anyway because of said issues (and other reasons). |
I guess you're just making the fall stop as soon as the rays detect the flloor. So sometimes you stop earlier, sometimes later. |
Can anyone still reproduce this bug in Godot 3.2.1 or any later release (e.g. 3.2.2-rc2)? If yes, please ensure that an up-to-date Minimal Reproduction Project (MRP) is included in this report (a MRP is a zipped Godot project with the minimal elements necessary to reliably trigger the bug). You can upload ZIP files in an issue comment with a drag and drop. |
The code in I cannot, to the best of my abilities, replicate this issue using the Sonic Outbreak code with 3.2.2. I cannot remember if I could with the other code (though it may not be relevant seeing as it uses Zip file includes both "Sonic Outbreak" and "Godot Sonic Engine" for comparison purposes. https://www.dropbox.com/s/6hyj1h4tlga8akn/24050_Demonstrator_possible.7z?dl=0 |
Note that this isn't as entirely "fixed" as it may seem, though. With Sonic Outbreak, |
Could you please check if the issue is still present in 3.4 beta 6? |
I'm uncertain if this is related to this issue, but attempting to run the Sonic Outbreak project with 3.4 beta 6 gives this:
Along with:
Unable to replicate using commit 5c97f2c of https://github.com/Sslaxx/Godot_Sonic_Engine (the last commit before I started using another codebase). |
Using a self-compiled custom build 3.4 3e2bb41 I get no such crashing. |
@Sslaxx Thanks for testing! I'm closing since the floor collision issue is fixed in 3.4. I was able to reproduce the crash in latest 3.x, it happens randomly and it's due to using |
This is probably related to #19956 and #20290.
Godot version:
3.0.6.
OS/device including version:
Windows, Linux (tested on both, as more than one developer involved).
Issue description:
We're working on a 2D Sonic platformer, Sonic Outbreak. The project does not use
is_on_floor
or the like due to its use of physics (angling collision bodies to slopes/ramps for one, its seeming requirement for movement in order to work etc).Floor collision is unreliable and seems to show different levels of "collision" (if any) with random jumps.
- this is how the project looks at the start of running it. Collision with the floor appears to be as expected.
Jumping with place usually produces this:
It usually alternates between what is expected/correct (the first picture) and this.
Sometimes, this happens instead: - similar, but smaller "gap".
I note #19956 talked about potentially problematic tilesets. Recreating the tileset did not fix this issue.
Steps to reproduce:
Play the game, try jumping (jumping in place, jumping while moving etc).
Minimal reproduction project:
24050_demonstrator.zip
Zip contains Windows (64-bit) and Linux (64-bit) binaries.
The text was updated successfully, but these errors were encountered: