0 Favourites

Issue with platform behavior

  • 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

  • Construct 3

    Buy Construct 3

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

    Buy 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)
Similar Topics Posts Views Last Post
Unread hot topic
0 Favourites
[BEHAVIOR] Chipmunk Physics
673 82,517
nelostic's avatar
nelostic
Unread hot topic
0 Favourites
[Behavior] LiteTween
672 169,922
manujorgo's avatar
manujorgo
Unread hot topic
564 105,239
rexrainbow's avatar
rexrainbow