Skip to content

GetObjectHeight

The GetObjectHeight function retrieves the height of a specified object in the game world. This function is useful for determining if a unit can fit through doorways, under obstacles, or in other constrained spaces.

Parameters

  • object: The object identifier (GUID) or unit identifier (such as "player", "target", "focus", etc.) for which to retrieve the height.

Returns

  • height: The height of the specified object, typically measured in game units.

Example Usage in Lua

Here is an example of how to use the GetObjectHeight function in Lua:

local api = ...

-- Function to print the height of the player
function PrintPlayerHeight()
    local player = "player"
    local height = api.GetObjectHeight(player)
    print("Player height: " .. height)
end

-- Call the function
PrintPlayerHeight()