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

KinematicBody2D and RayCastShape2D doesn't work on One Way Collision #27689

Closed
Tracked by #45334
podpathos opened this issue Apr 4, 2019 · 4 comments
Closed
Tracked by #45334

Comments

@podpathos
Copy link

podpathos commented Apr 4, 2019

Godot version:
3.1

OS/device including version:
Windows 10

Issue description:
When I set character with KinematicBody2D and RayCastShapes2D as in this post from news section character is stuck on the bottom side of one way platform (snap vector is not set),
1

if I then press jump one more time he is in postition it is supposed to be (snap vector is not set).
2

If I set snap vector according to the news post then this hapens. On first jump player is stuck like this:
3

I can move player thru platform but if I go to the edge player starts to jumps up and down:
5

If I jumo one more time player is above platform but RayCastShape2D does not register collision only KinematicBody's collision shape registers collision:
4

It seems to me that when player is inside the platform it stops when RayCastShape2D detects botom of platform so that player is stuck inside the platform (bottom edge of platform). Desired behavior is for RayCastShape2D not to detect one way platform when player is passing thru it, wich is not true unfortunatly. Is this behaviour a bug? I can disable RayCastShapes2D when characeter is jumpig, but thats have its one issues. I am interested to know is this a wonted behavior or bug?

Maybe it is related to issue #26402

Minimal reproduction project:
PlatformerTutorial.zip

@akien-mga akien-mga added this to the 3.2 milestone Apr 6, 2019
@podpathos
Copy link
Author

podpathos commented Apr 14, 2019

It seems to me that best way for one way platforms should be to use LineSegnemt2D and eneable one way collision like this:
linesegment

But same problems are present as with ConvexPolygonShape2D. RayShape does not detect LineSegnemt2D only CapsuleShape detects it, and if you rotate LineSegnemt2D then there is no effect of one way collision at all.
2

@pouleyKetchoupp
Copy link
Contributor

Fixed with #42574, closing.

@pouleyKetchoupp
Copy link
Contributor

Actually needs #45005 to be fixed, re-opening for now.

@pouleyKetchoupp
Copy link
Contributor

Fixed in 3.4 beta 6, closing.

@pouleyKetchoupp pouleyKetchoupp modified the milestones: 4.0, 3.4 Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants