Fixed inaccurate unprojection if world boundaries do not start at 0, 0 (spotted by oboforty on the forums).

This commit is contained in:
lewster32
2015-05-21 20:54:54 +01:00
parent 98a6d01799
commit 4dfacf4e0d
5 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -1842,8 +1842,8 @@ Phaser.Plugin.Isometric.Projector.prototype = {
z = z || 0;
var x = point.x - (this.game.world.width * this.anchor.x);
var y = point.y - (this.game.world.height * this.anchor.y) + z;
var x = point.x - this.game.world.x - (this.game.world.width * this.anchor.x);
var y = point.y - this.game.world.y - (this.game.world.height * this.anchor.y) + z;
out.x = x / (2 * this._transform[0]) + y / (2 * this._transform[1]);
out.y = -(x / (2 * this._transform[0])) + y / (2 * this._transform[1]);
File diff suppressed because one or more lines are too long