cykod / Quintus

HTML5 Game Engine
http://html5quintus.com
GNU General Public License v2.0
1.41k stars 401 forks source link

Sprite center of rotation point. #114

Open qsrahman opened 10 years ago

qsrahman commented 10 years ago

The sprites are drawn by moving their center of rotation form top left to sprite center in the Sprite class draw method. However the sprites are not properly translated to their centers, consider the code used in Sprite class refreshMatrix method: ... this.matrix.translate(p.x, p.y); ... Should not it be like: this.matrix.translate(p.x + p.w/2, p.y + p.h/2);