8 Direction Is Moving and Vector X and Y are inaccurate.

0 favourites
  • 2 posts
From the Asset Store
Rotate & Animation for 16 Direction & Mouse Direction
  • Problem Description

    Moving a sprite right and hitting a wall triggers the is not moving condition, but moving a sprite left and hitting a wall doesn't trigger the is not moving condition.

    Also the debugger says the sprite's vector x and y are not 0, but the text object says they are 0.

    Attach a Capx

    https://www.dropbox.com/s/ftv6nsm9k3rwv ... .capx?dl=0

    Description of Capx

    The text object shows you the sprite's vector x and y and it shows you if the sprite is moving or not.

    Steps to Reproduce Bug

    • Move the sprite to the right until you hit a wall.
    • Move the sprite to the left until you hit a wall.
    • Move the sprite up or down until you hit a wall.

    Observed Result

    The text object says the sprite is not moving when moving right when hitting a wall, but it says the sprite is moving when it's moving left and hits a wall.

    And the debugger shows different values than the text object for the vector x and y like in the pictures below.

    Moving right and hitting a wall: https://i.imgur.com/5QJbSES.png

    Moving left and hitting a wall: https://i.imgur.com/YDFPX9R.png

    Expected Result

    The text object should always say is not moving when hitting any wall.

    Affected Browsers

    • Chrome: YES
    • FireFox: YES
    • Internet Explorer: YES

    Operating System and Service Pack

    Windows 8.1

    Construct 2 Version ID


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Should be fixed in the next build.

    Note the debugger shows the correct values; the text object sometimes applies a small amount of rounding. Since math calculations on CPUs aren't exact, it was calculating a value like 0.000000000000001 as the Y speed, which ended up causing "is moving" to be true because it was nonzero.

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