You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is that we are trying to check pixel perfect collisions and when we do that the hands kind of collide with block. As we have declared in code that check for vertical collisions is done by checking if the player and any object are colliding when the player is moving in the vertical direction, so when it detects that very specific collision it puts it back on the top of the block but the player keeps falling in middle air due to the hand collide. A fix isn't absolutely necessary but there can be 2 ways one is to let go of pixel perfect collisions completely and assign hitboxes, the other would be to write a code that checks if the player is actually hitting the bottom or from somewhere in the middle of its 'rect' so if this happens it should move a little in the direction its facing this would make the player fall of after 2 or 3 such moves but this isn't ideal as it is possible that the player is facing in other direction than the direction of the object he is falling from but that's all I could do . I have attached the video of the second fix
Platformer.2023-02-12.17-35-49.mp4
Platformer.2023-02-12.17-36-23.mp4
Platformer.2023-02-12.17-34-04.mp4
Platformer.2023-02-12.17-34-55.mp4
The text was updated successfully, but these errors were encountered: