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

Bugs will be moved here once resolved.

Post » Mon Sep 25, 2017 12:18 am

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
r246
B
13
S
7
G
6
Posts: 84
Reputation: 4,008

Post » Wed Oct 18, 2017 3:03 pm

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.
Scirra Founder
B
402
S
238
G
89
Posts: 24,644
Reputation: 196,095


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 3 guests