UnityPlayground icon indicating copy to clipboard operation
UnityPlayground copied to clipboard

Possible issue with Jump.cs

Open ciro-unity opened this issue 8 years ago • 2 comments

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

ciro-unity avatar May 23 '17 13:05 ciro-unity

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

Westerveld avatar May 15 '18 14:05 Westerveld

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.

ciro-unity avatar Jun 02 '18 21:06 ciro-unity