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

Move vertically one way platform mask is set too late #82

Open
midnightwalker opened this issue Jun 12, 2017 · 1 comment
Open

Move vertically one way platform mask is set too late #82

midnightwalker opened this issue Jun 12, 2017 · 1 comment

Comments

@midnightwalker
Copy link

Is this line in moveVertically only because CharacterController2D supports slopes?

if( ( isGoingUp && !collisionState.wasGroundedLastFrame ) || ignoreOneWayPlatformsThisFrame )
mask &= ~oneWayPlatformMask;

In our game it causes wrong kind of movements because when player jumps he hits OneWayPlatform and jump stay short because of that. Is there any drawback if we leave it like this? (we don't need slopes)

if( isGoingUp || ignoreOneWayPlatformsThisFrame )
mask &= ~oneWayPlatformMask;

@Joimer
Copy link

Joimer commented Aug 23, 2017

@midnightwalker I solved the short jump bug and kept the slopes by setting the controller to ignore one way platforms for one frame when pressing the jump button. It's a hack, and I would like to improve the character controller instead, but it's quick and works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants