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

CircleShape2D weird behavior with Moving Platforms #40256

Closed
Tracked by #45334
henriiquecampos opened this issue Jul 10, 2020 · 5 comments · Fixed by #50314
Closed
Tracked by #45334

CircleShape2D weird behavior with Moving Platforms #40256

henriiquecampos opened this issue Jul 10, 2020 · 5 comments · Fixed by #50314

Comments

@henriiquecampos
Copy link
Contributor

Godot version:

3.2.2.stable.official

OS/device including version:

Solus 4.1 Gnome 3.36.3

Issue description:

Using a CollisonShape2D with a CircleShape2D causes KinematicBody2D to behave weirdly when dealing with moving platforms. Check the minimal reproduction project for implementation details.

Bugs noticed:

  • When the platform moves up the Player can't jump
    moving-platform-jump-bug

  • If CollisionShape2D.one_way_collision = true the above bug is fixed but the KinematicBody2D some times passes through the platform
    one-way-collision-bug

Both problems are fixed when using a RectangleShape2D

rectangle-fix

Steps to reproduce:

  1. Implement basic movement using KinematicBody2D.move_and_slide_with_snap()
  2. Implement moving platforms with KinematicBody2D.sync_to_physics = true and an AnimationPlayer, optionally set the AnimationPlayer.playback_process_mode = ANIMATION_PROCESS_PHYSICS
  3. Use CircleShape2D on the Player's KinematiBody2D/CollisionShape2D.shape
  4. Animate the Platform moving up and down
  5. Jump on the platform and try to jump on it when it goes up
  6. Set the Platform's KinematicBody2D/CollisionShape2D.one_way_collision = true
  7. Repeat step 5 with quick hops

Minimal reproduction project:

circleshape-bug-minimal-project.zip

@Xrayez
Copy link
Contributor

Xrayez commented Jul 10, 2020

Perhaps could be fixed by #36280?

@henriiquecampos
Copy link
Contributor Author

Perhaps could be fixed by #36280?

Maybe the second issue, but I can't see how it would fix the first one, the one that prevents jumping when the platform moves up.

@pouleyKetchoupp
Copy link
Contributor

Both issues are fixed by #42574, closing.

@akien-mga akien-mga added this to the 4.0 milestone Jan 15, 2021
@henriiquecampos
Copy link
Contributor Author

henriiquecampos commented Jun 16, 2021

Both issues are fixed by #42574, closing.

Just tested Godot 3.3.stable.official, and they are not fixed.

@pouleyKetchoupp
Copy link
Contributor

When the platform moves up the Player can't jump

Indeed, I can confirm this is still not fixed.

If CollisionShape2D.one_way_collision = true the above bug is fixed but the KinematicBody2D some times passes through the platform

This one seems to be fixed though. Are you still able to reproduce it?

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.

4 participants