RotateVector

Rotate a vector (x,y,z) and apply a distance calculation to it.

For instance getting the vector 10 yards infront of the players facing direction.

RotateVector(x,y,z,theta,distance) : x,y,z
  1. See Object Reference for more information on possible values.

Example

Get the Vector 10 yards infront of the direction of the player.

local px, py, pz = ObjectPosition('player')
local theta = ObjectRotation('player')
local height = ObjectHeight('player')
 
local X, Y, Z = RotateVector(px, py, pz, theta, 10);