How do I Reduce Character Polygon Collider while crouched

0 favourites
  • 4 posts
From the Asset Store
2d mushroom sprite 2d game mushroom character enmy sprite game art
  • hello,

    while making a platformer, it may happen that the gameply require the player to crouch to avoid obstacles or go into smaller areas,

    i have started with spriter to create some characters and now my problem is that i don't see any "set Height" parameter available .

    so while debugging for now i get this result when the chracter is crouhing. wich is aboslutelly uselless ...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Always use an invisible placeholder for collisions - then use events to change height and width properties.

  • Right, then you need events like:

    If player is NOT holding down key AND there is no ceiling directly above the characters head, AND he is currently crouching, then play the standing up animation.

    I use an overlap detection sprite pinned above the players head level while he's crouching to detect whether or not the player can stand up or not...IE, if the overlap detecting sprite is NOT overlapping a background obstacle, then let the player stand up, if not, keep him stuck in the crouched state.

  • Right, then you need events like:

    If player is NOT holding down key AND there is no ceiling directly above the characters head, AND he is currently crouching, then play the standing up animation.

    I use an overlap detection sprite pinned above the players head level while he's crouching to detect whether or not the player can stand up or not...IE, if the overlap detecting sprite is NOT overlapping a background obstacle, then let the player stand up, if not, keep him stuck in the crouched state.

    thanks sounds a very good idea

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