Skip to content

QAngle

Fields


Name Type Ranges
pitch float Rotation around the x axis
yaw float Rotation around the y axis
roll float Rotation around the z axis

Functions


QAngle()

Return value

Name Type Description
angle QAngle Returns a QAngle ( 0, 0, 0 )
Example

1
2
3
4
local angle = QAngle()
EngineClient:ExecuteCmd("echo pitch: " .. tostring(angle:pitch))
EngineClient:ExecuteCmd("echo yaw: " .. tostring(angle:yaw))
EngineClient:ExecuteCmd("echo roll: " .. tostring(angle:roll))
This code will create a QAngle instance and then print out all the fields. The fields are zero because QAngle has been called without any other parameters.


QAngle()

Parameters

Parameter Type Description
pitch float Rotation around the x axis
yaw float Rotation around the y axis
roll float Rotation around the z axis

Return value

Name Type Description
angle QAngle Returns a QAngle ( pitch, yaw, roll )
Example

1
2
3
4
local angle = QAngle(85,0,0)
EngineClient:ExecuteCmd("echo pitch: " .. tostring(angle:pitch))
EngineClient:ExecuteCmd("echo yaw: " .. tostring(angle:yaw))
EngineClient:ExecuteCmd("echo roll: " .. tostring(angle:roll))
This code will create a QAngle instance and then print out all the fields.