phaser - v4.0.0-rc.4
    Preparing search index...
    • Converts from world XY coordinates (pixels) to isometric tile XY coordinates (tile units), factoring in the layers position, scale and scroll. This will return a new Vector2 object or update the given point object.

      Parameters

      • worldX: number

        The x coordinate to be converted, in pixels, not tiles.

      • worldY: number

        The y coordinate to be converted, in pixels, not tiles.

      • snapToFloor: boolean

        Whether or not to round the tile coordinate down to the nearest integer.

      • point: Math.Vector2

        A Vector2 to store the coordinates in. If not given a new Vector2 is created.

      • camera: Cameras.Scene2D.Camera

        The Camera to use when calculating the tile index from the world values.

      • layer: LayerData

        The Tilemap Layer to act upon.

      • OptionaloriginTop: boolean

        Which is the active face of the isometric tile? The top (default, true), or the base? (false) Default true.

      Returns Math.Vector2