[r178] 8-Direction bug

0 favourites
  • 2 posts
From the Asset Store
Character Sprite Pack: Walk 4 Directions made in illustrator
  • Problem Description

    8Direction adds a small Y-Vector positive movement(down) when going left at maximum speed. I thought that this is happening because of the smooth turning from other directions but this is applied even when the object continues its left-side route.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/686 ... k_bug.capx

    Description of Capx

    In the capx there is a tank with an 8 Direction control scheme, using only 4 directions and with "Set angle: off". It has 4 looped animations (besides Default) for each of the directions(left, right, up and down) of movement 2 frames each. Animations are switched according to its Vector X and Vector Y readings, as it can be seen in the events.

    Also the last event one causes the tank to spawn red particles when the bug appears (when the Left key is pressed AND Y Vector is greater then 0).

    Steps to Reproduce Bug

    • Step 1: Run the capx
    • Step 2: Press left arrow and wait for the tank to accelerate to maximum speed

    Observed Result

    Tank changes its animation to left-moving once the it starts to move left, but when reaching its maximum speed frame changes to down-moving, because its Vector Y becomes greater then 0 with no apparent reason.

    Expected Result

    Tank Y Vector should not react to the left/right movements.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Windows 7 Home Edition SP1

    Construct 2 Version ID

    Release 178 (64bit)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's basically just a tiny rounding error. See Common mis-used events and gotchas "Expecting math calculations to be exact". Just adjust your events to not work with zero, e.g. > 0.1 instead of > 0.

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