small Platform Behavior movement bug

0 favourites
  • 4 posts
From the Asset Store
A pack of 76 platform designs for a platformer game with a mushroom/jungle theme
  • Problem Description

    Disabling the Platform Behavior while the object is moving and then re-enabling it will make the object continue to move for a brief moment even though no movement keys are being pressed.

    Attach a Capx

    http://www.filedropper.com/platformbug

    Description of Capx

    A sprite object with platform behavior and 2 events to enable/disable it

    Steps to Reproduce Bug

    • Step 1: Left click to disable the platform behavior while holding down left or right arrow keys
    • Step 2: Right click to re-enable platform behavior while not holding down any keys Observed Result Object continues to move for an instant after re-enabling platform behavior while not pressing any movement keys Expected Result Object should not move at all after re-enabling platform behavior Affected Browsers
      • Chrome: YES
      • FireFox: yes
      • Internet Explorer: yes

    Operating System and Service Pack

    Windows 10 Version 1511

    Construct 2 Version ID

    239

  • Setting the x vector of the platform behaviour to 0 after re-enabling it will give you your expected result.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey thanks a lot this does the job

  • Closing as not a bug: it's still got the same velocity and goes through the same deceleration as if you left it enabled, but just delayed since you disabled processing of the behavior.

    If you want to disable the behavior *and* remove its current velocity, set the X/Y vectors, as suggested.

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