-
Notifications
You must be signed in to change notification settings - Fork 164
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
Moving platform and problems getting stuck at slopes #52
Comments
I'll try to take a look this weekend. |
Moving minimum distance from environment up to .1 solves the sticking, but introduces some glide. |
I had a similar issue but changing it to 0.55 improved things greatly and has (I hope) fixed the issue I had of the main character dropping through one way platforms too. |
First of all thank you for this amazing library! Any news on this issue? I've been looking the code and I think that there is some bug in PlatformerMotor2D.CheckSurroundings() but I'm not sure... Is this possible? To avoid this issue I did a workaround that adds/removes the moving platform layer to the variable "Moving Platforms Layer" when the player approaches to the moving platform. I used an additional collider object to trigger that. It isn't the most elegant way but it works fine. |
No news on the issue, been slammed with other projects and haven't been able to look at this one. Definitely possible there's a bug in PlatformerMotor2D.CheckSurroundings() :) |
I think I may have fixed the problem. The line that is causing all of this is in UpdateMovingPlatform() on line 1741. Replace _collisionMask with movingPlatformLayerMask. I think the motor was detecting the static environment and caused the problem with SeparateFromEnvironment() being triggered wrongly. I hope this helps as i have been banging my head against the issue for over a year on and off. I was even convinced that I would have to specifically design around having either slopes or moving platforms. |
While I haven't tested this thoroughly, it seems to have fixed the issue I was having: Last but not least, thanks for the awesome character controller. |
Glad to hear this seems to be on the right track. 👍 I imagine this needs to be tested a bunch more before I'm satisfied that it's a solution but otherwise I haven't gotten stuck yet after a week of playtesting with it |
When the motor have available the moving platform option, assigning a layer mask to it, the player get stucked when trying to get up/down slopes. Everything works fine with the slopes when no layer mask is assigned.
The text was updated successfully, but these errors were encountered: