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?
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.
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.
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.
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.