UnityPlayground
UnityPlayground copied to clipboard
Possible issue with Jump.cs
From Art of Jimbo on Twitter
the jump scrip, even with a 'ground' tag still seems to let player jump a little higher than they should. I thought the 'ground' tag would allow player to jump once and then drop back down (depending on gravity, drag etc) but it seems even with platform elements tagged with 'ground' you can still make player jump more than they should
a possible fix would be to add this check to the collision statement:
collisionData.contacts[0].normal == Vector2.up
This would mean that having slanted platforms would result in the user not being able to jump off them
Yeah, maybe I can check the normal in a range (so if Y is more than 0, should be a valid platform). That might introduce more bugs than fix things… we'll see. It's not a super high priority issue, but I'll leave it open as a reminder.