Prevent player stick to the roof

My character got his head stuck to the roof(upper_platform) just like this. Still can move around just like on the ground tho.
Is there a way to prevent this

What are your events, what do you have to do to make it happen? Do you change gravity in the game at all?

just the basic movement event. the player’s gravity is 1600.

Hi @Bunny. Do you need to trigger it? Or does your character behave like this all the time?
And can you provide a screenshot of Sprite’s collision mask?

Yeah, that was my next port of call. from the events and symptoms, it sounds suspiciously like a hit box that’s too large.

I just hold the jump button and it will stick there.

Looks like the Collision Mask isn’t the problem.

Weird. That shouldn’t have happened. Can you provide screenshots of Sprite’s collision mask of the jump animation?

Your Collision Mask of Jump Animation might be different from the idle animation.

here it is.
I don’t know how the animation is that gonna affect the player movement tho.

You are using Platformer Behavior. With Platformer Behavior, are you using other behaviours too?

Its not the animation that affects the Player’s movement. Its the Collision Mask. If you don’t know what a collision mask is, you can read about it here.

oh right, I use the physic behavior as well. If I don’t, the problem will be fixed but the player can’t push the block that I want anymore

Don’t know why but looks like this was the cause of the problem.

If you want to push a block then here is a tutorial from Wishforge Games:

Implement this and don’t use the Physics Behavior.

1 Like

In general: You should never mix movement behaviors on a single object. (physics, platformer, and top down). They all have their own different logic and movement forces and as far as I know combining them is wholly unsupported.

ok,(⌒ ▽ ⌒) ☆ so I tried that one I the video. but it doesn’t push the block from the edge but like overlapping each other. (* ´ ▽ `*)
I found out that you can actually use separate collision and it will push the block from the edge but then again the block goes through the wall, I’m stuck at this part again. ( ̄ □  ̄ 」)

Hi I don’t know if you solved yet but here is what I do
Three sprites involved the playerHitbox=Red box with Platformer behavior, Player the player itself and playerFloorCollider=Green box slightly small that the Playerhitbox and used to check if the player is on floor. so never is going to be in collision with the ceil or roof in the levels.

Simply check if playerFloorCollider is in collision with floor then act in kind.