QAngle to Vector

Please post any questions about developing your plugin here. Please use the search function before posting!
decompile
Senior Member
Posts: 417
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

QAngle to Vector

Postby decompile » Thu Jun 02, 2016 8:48 pm

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)
User avatar
Ayuto
Project Leader
Posts: 2209
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: QAngle to Vector

Postby Ayuto » Thu Jun 02, 2016 9:20 pm

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.

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 59 guests