Issue with platform behavior

0 favourites
  • 2 posts
From the Asset Store
Wanting to do a Shot n Run game easily? Here is your chance!
  • Problem Description

    If you try to jump against a wall keeping the direction to the right pulsed, the sprite object with the behavior platform will be locked.

    The object should jump, but obviously it should not go forward because there is a wall. In the example the object does not jump, it only trembles.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/60803633/platformBehavior.capx

    Description of Capx

    Sprite with platform behavior and some green solids

    Steps to Reproduce Bug

    • Press and hold right cursor
    • Also press cursor up to jump
    • The sprite gets stuck

    Observed Result

    The sprite is not able to jump because the right cursor is being pressed.

    Expected Result

    The sprite must be able to jump even though the right cursor is being pressed.

    The sprite, obviously, should not advance until it exceeds the height of the solid.

    Affected Browsers

    • Chrome: (YES)

    Operating System and Service Pack

    win7 64 bits SP2

    Construct 2 Version ID

    R241 64bits

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Closing as won't fix. The problem is you use a tiny object with a very low jump strength of 16. This means when you jump assuming 60 FPS it steps about 0.26 of a pixel - so small that the next tick the platform behavior still detects itself as being on the floor. It has to have some tolerance threshold for the various collision algorithms it uses to work. If you set the jump strength to something higher like 50 it works fine.

    I don't think we can change this without breaking other platform games. You'll have to just use larger objects (given you use 8x8 objects, a 1px tolerance in the collision detection algorithms is quite large relative to the object size), or a higher jump strength.

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