mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 07:01:20 +00:00
Change positioning for isometric object layer from Tiled
This commit is contained in:
parent
d844f48e87
commit
33f242a2e0
1 changed files with 13 additions and 0 deletions
13
dist/phaser-arcade-physics.js
vendored
13
dist/phaser-arcade-physics.js
vendored
|
@ -130610,6 +130610,19 @@ var Tilemap = new Class({
|
|||
sprite.displayHeight = obj.height;
|
||||
}
|
||||
|
||||
if (this.orientation === ORIENTATION.ISOMETRIC)
|
||||
{
|
||||
|
||||
var isometricPosition = {
|
||||
x: sprite.x - sprite.y,
|
||||
y: (sprite.x + sprite.y) / 2
|
||||
}
|
||||
|
||||
sprite.x = isometricPosition.x
|
||||
sprite.y = isometricPosition.y
|
||||
|
||||
}
|
||||
|
||||
// Origin is (0, 1) in Tiled, so find the offset that matches the Sprites origin.
|
||||
// Do not offset objects with zero dimensions (e.g. points).
|
||||
var offset = {
|
||||
|
|
Loading…
Reference in a new issue