How to fix a animation Bug if you run against a wall.

0 favourites
  • 4 posts
From the Asset Store
Full game Construct 2 and Construct 3 to post on Google Play
  • Hello guys,

    i have a known problem i think. So i think a lot of people had this problem already and maybe know a solution. SO you have a normal player with normal animations with a collision box (NOT bounding box) and you run for jump against an object, the current frame gets shown again and again. I think its cause of the collision box but maybe some of you have a better idea because i dont like bounding box as collision.

    Thank you a lot



  • Try just adding an additional action "trigger once while true" with "is by wall"

    if you are using the the platformer behaviour

    or use the "on collision at offset" to check if you are against a wall, if you are doing it another way

  • If your collision polygons are different for each frame, then yes, this is probably the reason. When animation is playing, some frames collide with the wall and some don't, even when the character x,y position remains the same.

    You can try "overlapping at offset" as justifun suggested, although I think it also uses character's collision polygon, so you may have the same problem only at an offset.

    You can compare distance() between bounding boxes of your character and walls instead of collision detection. Or you can pin an invisible sprite with rectangular collision polygon and use it to detect collision with walls, ceilings etc.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • dop2000 , justifun Sorry for the late answer. I tried a lot around with invisible objects and so on but i think the only really good solution are other collision boxes. So i played around and now it works. But i thank you a lot for trying to help me.

    Thank you Cryttexx

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)