wowpedia
Main Menu


Positions a model relative to the bottom-left corner.

Model:SetPosition(positionX, positionY, positionZ)

Arguments

positionX
number - Positive values moves the model right; negative left.
positionY
number - Positive values moves the model up, negative down.
positionZ
number - Positive values moves the model nearer; negative further away.

Details

Example

The following script calculates these top and right edges:

local scale = UIParent:GetEffectiveScale();
local hypotenuse = ( ( GetScreenWidth() * scale ) ^ 2 + ( GetScreenHeight() * scale ) ^ 2 ) ^ 0.5;
 
local coordRight = ( model:GetRight() - model:GetLeft() ) / hypotenuse; -- X
local coordTop = ( model:GetTop() - model:GetBottom() ) / hypotenuse; -- Y