Knowledge Base - Path Follower

Path Follower


A PathFollower is an invisible thing that follows a path of InterpolationPoints and can provide something for a camera to aim it if you want the camera to follow a path with a complicated aiming sequence.

The PathFollower (9071) takes three parameters:

  1. low byte: low byte of tid of first InterpolationPoint in path.
  2. high byte: high byte of tid of first InterpolationPoint in path.
  3. options: (Add any of the following values; i.e. for options 2 and 4, this parameter would be 6):
    • 1: path is linear instead of curved.
    • 2: Camera will adjust its angle to match those of the points it passes.
    • 4: Camera will adjust its pitch to match those of the points it passes.
    • 8: When used with 2 and/or 4, the camera faces in the direction of movement instead of the direction the InterpolationPoints are facing.

The pathfollower uses a set of Interpolation points (9070) that define a path to follow. They operate similar to the pathnode of a monster patrol route.

  1. pitch: pitch of camera in degrees, 0 is straight ahead, 1-89 is down, and 166-255 is up (angle subtracted from 256).
  2. time: time (in octics) to travel to next node.
  3. pause: time (in octics) to stop at this node before continuing.
  4. low byte: low byte of tid of next InterpolationPoint in the path.
  5. high byte: high byte of tid of next InterpolationPoint in the path.

Parameter 4 has the low byte, and parameter 5 has the high byte, so the tid is parm4+(parm5*256). This lets you use more than 255 points for all paths. For example, if the next point had a tid of 4 then the low byte is 4 and the high byte is 0.

In addition, there is now a SymbioticPoint (9075) that will activate when any InterpolationPoint with its same TID is used by any of the moving objects (MovingCamera, PathFollwer or ActorMover). The thing special for the SymbioticPoint will be triggered. It will be repeatable, so if you only want it to trigger once, handle that in scripting.

Use the Thing_Activate special to start the pathfollower.

The Thing_Activate takes a single parameter, the tid of the thing to activate.

To stop a pathfollower use Thing_Deactivate. Thing_Deactivate takes one parameter, the tid of the thing to deactivate. If the camera is restarted using Thing_Activate, it will automatically start at the beginning of the path.

Sources

ZDoom reference by Marisa Heit.

Back