A_FaceTracer

From ZDoom Wiki
Jump to: navigation, search

A_FaceTracer [(float angle)[, float pitch]]

Changes the calling actor's angle to face its current tracer. The tracer field is used by homing projectiles to store its homing target.

If angle is specified, then the calling actor cannot turn by more than said angle. (A value of 0 is interpreted as unlimited angle.) However, the SHADOW flag has no effect in such case.

If pitch is specified to a value no greater than 180, then the calling actor's pitch is adjusted by up to said value to face its current tracer. (A value of 0 is interpreted as unlimited angle; and technically a pitch change will never be greater than 180 degrees.)

Examples

This function can cause homing projectiles to face their targets at all times.

Spawn:
    BALL A 4 A_FaceTracer
    BALL B 4 A_SeekerMissile(5, 10)
    loop

See also