TraceLine
Returns the position of the camera.
TraceLine(x1, y1, z1, x2, y2, z2, hitFlags) : x, y, z
Example
Checks the line of sight between the player and target.
local x1, y1, z1 = ObjectPosition('player')local x2, y2, z2 = ObjectPosition('target')local hitFlags = bit.bor(0x1, 0x10, 0x100, 0x100000)local x, y, z = TraceLine(x1, y1, z1, x2, y2, z2, hitFlags)
Info
Hit Flags:
M2Collision = 0x1M2Render = 0x2WMOCollision = 0x10WMORender = 0x20Terrain = 0x100WaterWalkableLiquid = 0x10000Liquid = 0x20000EntityCollision = 0x100000Unknown = 0x200000