mirror of
https://github.com/wassname/phaser-plugin-isometric.git
synced 2026-09-09 11:28:50 +08:00
Fixed default Z coordinate for Projector.unproject.
This commit is contained in:
+4
-1
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user