Returns an array of Vector2s where each entry corresponds to the corner of the requested tile.
The tileX
and tileY
parameters are in tile coordinates, not world coordinates.
The corner coordinates are in world space, having factored in TilemapLayer scale, position and the camera, if given.
The size of the array will vary based on the orientation of the map. For example an orthographic map will return an array of 4 vectors, where-as a hexagonal map will, of course, return an array of 6 corner vectors.
name | type | arguments | description |
---|---|---|---|
tileX | number |
The x coordinate, in tiles, not pixels. |
|
tileY | number |
The y coordinate, in tiles, not pixels. |
|
camera | Phaser.Cameras.Scene2D.Camera | <optional> |
The Camera to use when calculating the tile index from the world values. |
Returns an array of Vector2s, or null if the layer given was invalid.