ObjectRotation

Returns the rotation of a WowGameObject in radians.

ObjectRotation(--[[(1)]]objectReference) : rotation | false
  1. See Object Reference for more information on possible values.

Example

Get the players rotation.

local rotation = ObjectRotation('player')

Do something with the rotations of all objects.

for i, object in ipairs(Objects()) do
local rotation = ObjectRotation(object)
-- do something with rotation
end