ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


This is an old revision of the document!

Table of Contents



Converts a 3D vector to a pair of angles (yaw and pitch).


Make the player look along the vector:

VectorToAngles(1.0, 2.0, 3.0);
int angle = r1;
int pitch = r2;

SetActorAngle(tid, angle);
SetActorPitch(tid, -pitch); // Note that actor pitch is inverted in ZDoom.
Use LookAtPoint instead of the example code above.
functions/vectortoangles.1489767179.txt.gz · Last modified: 2017/03/17 18:12 by korshun