Webclient 507.1259
Info:
My project uses custom keys set up using winset.
Up = W
Left = A
Right = D
Descriptive Problem Summary:
When holding up(W) to move forward and left(A) or right(D) to turn the player jumps between (0, 0) and its current pixel offset possibly more.
Only happens when moving forward and turning at the same time.
Works in Dream Seeker with no issues.
Source: https://dl.dropboxusercontent.com/u/17935054/ Space%20Wars_src.zip
Resolved
| |||||||||||||
I found the issue and was able to take care of it.
As a note, the method you're using to animate probably isn't ideal. By calling animate() twice, you're essentially saying "Animate this--no wait, animate that instead". The code in DS handled this fairly gracefully because both animations ultimately ended up combined on the same tick, but the server code had to treat this as a transition--where an animation is interrupted partway and a new one is started. Better practice is to set the transformation matrix and pixel updates in the same animate() call. That wouldn't have triggered this issue. But it's a good thing the issue did trigger in this case, for the sake of finding and fixing the bug. |
Just FYI, you can simplify your code a bit because cos(90-angle) = sin(angle) and vice-versa.