OSRS Plugin API
    Preparing search index...

    Function worldToScreenCoord

    • Returns the the screen coordinates associated with this world coordinates. Pass fine coordinates if you want to accurately track a moving 3D position like a character's head.

      Parameters

      • coord: FineCoord

        the coordinates to retrun screen coordinates for

      Returns Vector2

      a Vector2 containing the screen coordinates of the given FineCoord

      -- Get the screen position above the character's head
      local currentCoord = osrs.ClientOp.coord()
      local playerCoord = currentCoord.getFineCoordinate()
      playerCoord.y = playerCoord.y - 192
      local screenCoord = osrs.Graphics.worldToScreenCoord(playerCoord)