small Platform Behavior movement bug

Bugs will be moved here once resolved.

Post » Tue Dec 20, 2016 9:52 pm

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
B
8
S
3
Posts: 49
Reputation: 698

Post » Tue Dec 20, 2016 10:30 pm

Setting the x vector of the platform behaviour to 0 after re-enabling it will give you your expected result.
Image
B
30
S
9
G
3
Posts: 171
Reputation: 3,329

Post » Tue Dec 20, 2016 10:37 pm

Hey thanks a lot this does the job :)
B
8
S
3
Posts: 49
Reputation: 698

Post » Wed Dec 21, 2016 2:48 pm

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.
Scirra Founder
B
397
S
236
G
88
Posts: 24,389
Reputation: 194,448


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests