Skip to content

Make ceiling cancel jump velocity#20

Open
suhankins wants to merge 1 commit intoKenneyNL:mainfrom
suhankins:main
Open

Make ceiling cancel jump velocity#20
suhankins wants to merge 1 commit intoKenneyNL:mainfrom
suhankins:main

Conversation

@suhankins
Copy link

Right now, if you jump and hit a ceiling, your character will awkwardly keep floating in the air for a few seconds.

kenney_fps_bug.mp4

The problem is that it takes a while for normal gravity to cancel out all the negative gravity given by the jump.

With this fix, gravity is set to 0 if you hit a ceiling while having negative gravity.

kenney_fps_fix.mp4

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

Successfully merging this pull request may close these issues.

1 participant