Fixed default Z coordinate for Projector.unproject.

This commit is contained in:
lewster32
2014-08-28 13:29:56 +01:00
parent fed085c721
commit 190d3bbf3e
+4 -1
View File
@@ -97,7 +97,7 @@ Phaser.Plugin.Isometric.Projector.prototype = {
* @method Phaser.Plugin.Isometric.Projector#unproject
* @param {Phaser.Plugin.Isometric.Point} point - The Point to project from.
* @param {Phaser.Point3} out - The Point3 to project to.
* @param {number} z - Specified z-plane to project to.
* @param {number} [z] - Specified z-plane to project to.
* @return {Phaser.Point3} The transformed Point3.
*/
unproject: function (point, out, z) {
@@ -105,6 +105,9 @@ Phaser.Plugin.Isometric.Projector.prototype = {
out = new Phaser.Point3();
}
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;