Page 1 of 1

QAngle to Vector

Posted: Thu Jun 02, 2016 8:48 pm
by decompile
Hey,

Just wondered if theres a way to use QAngle for keyvalues of an entity.

I added a custom 'info_teleport_destination' and used the Player(index).eye_angle which returns an QAngle.
Now I want to modify the destinations 'angles' but it only allows Vector.

Syntax: Select all

Angle = QAngle(0, -90, 0)
....
Vector(Angle.x, Angle.y, Angle.z)

Re: QAngle to Vector

Posted: Thu Jun 02, 2016 9:20 pm
by Ayuto
The easiest way to convert a QAngle instance to a Vecor is the following:

Syntax: Select all

angle = QAngle(0, -90, 0)
vector = Vector(*angle)
That should work perfectly fine.