mirror of
https://github.com/wassname/phaser-plugin-isometric.git
synced 2026-09-10 12:29:48 +08:00
Fixed inaccurate unprojection if world boundaries do not start at 0, 0 (spotted by oboforty on the forums).
This commit is contained in:
Vendored
+2
-2
@@ -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]);
|
||||
|
||||
Vendored
+3
-3
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user