Trixt0r / spriter

A Generic Java importer for Spriter animation files.
https://brashmonkey.com
Other
142 stars 53 forks source link

setPosition with strange behavior #39

Closed yuripourre closed 7 years ago

yuripourre commented 7 years ago

After load a character, I call:

player.setPosition(x,y);

But the character is rendered at (0,0) and the position only changes after some draw calls (is possible to see the character then it is teleported to the right position).

Am I missing something?

P.S.: The position takes less than a second to update.

Trixt0r commented 7 years ago

Yout have to call setPosition before player.update

yuripourre commented 7 years ago

Thank you very much, it worked.