Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

ChangeYaw

From Quake Wiki

Revision as of 15:24, 1 August 2023 by Boondorl (talk | contribs) (Created page with "''void'' '''ChangeYaw'''() == Usage == Turns an entity towards its '''ideal_yaw''' based off its '''turn_speed''', stopping once it reaches it. This will rotate the entity as...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

void ChangeYaw()

Usage

Turns an entity towards its ideal_yaw based off its turn_speed, stopping once it reaches it. This will rotate the entity as quickly as the function is called. Mostly used with monsters to turn towards their enemies.

Example

// This monster calculates the direction towards its enemy then starts turning
self.ideal_yaw = vectoyaw(self.enemy.origin - self.origin);
ChangeYaw();