Classes:MovingCamera

From ZDoom Wiki
Jump to navigation Jump to search
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
  1. You do NOT need to copy that actor, since it is already defined.
  2. In fact, it's not just useless, it will cause problems.
  3. If you want to modify it, or use a modified version, using inheritance is the way to go.
  4. The actor definitions here are put on the wiki for reference purpose only. Learn from them, don't copy them.
Moving camera
Actor type Script thing Game MiniZDoomLogoIcon.png (ZDoom)
DoomEd Number 9072 Class Name MovingCamera


Classes: PathFollowerMovingCamera

Usage

The MovingCamera is, as the name implies, a camera that moves along a predetermined path. The movement is quite smooth and is perfect for creating those cut scenes found in most games today.

To start a moving camera use Thing_Activate. To stop a moving camera use Thing_Deactivate. The camera will automatically start at the beginning of the path when using Thing_Activate. The camera will not respond to activation again until it has finished moving along the path. If you wish to restart the camera while it is still following the path, you must call Thing_Deactivate first. You can use the ChangeCamera (237) special or SetCameraToTexture in ACS to view the camera.

Arguments

The moving camera takes four arguments:

  • args[0] → low byte of tid of first InterpolationPoint in path.
  • args[1] → high byte of tid of first InterpolationPoint in path.
  • args[2] → 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 interpolation points are facing.
  • 128: all players will see the camera's view, and not just the player who activates it.
  • args[3] → tid of thing to look at (or 0). If specified, settings 2 and 8 in args[2] are ignored. Setting 4 will adjust pitch to center the thing being aimed at.

DECORATE definition

ACTOR MovingCamera : PathFollower native
{
  CameraHeight 0
}