User Tools

Site Tools


move_camera_at_speed

Move Camera At Speed


Moves the camera to the specified (X,Y,Z) coordinate or named camera position at a particular speed (measured in voxels per second). A target to aim the camera towards can optionally be specified. If using a camera position for the destination, this “look at target” will override the angle.

Signature:

move_camera_at_speed(destination, speed, look_at_target)
ArgumentDescriptionTypeRequired
destinationDestination coordinate or camera position.Coordinate or StringYes
speedSpeed at which to move the camera (in voxels/sec).DecimalYes
look_at_targetCoordinate or entity to aim the camera towards.Coordinate or EntityNo

Lock Camera must be called before using this function to prevent the player from manually controlling the camera.

Example:

move_camera_at_speed(coord[2, 2, 32], 60, entity["chest01"]);

Results: The camera is moved at a speed of 60 voxels/second to coordinate (2, 2, 32) and rotated to aim towards the entity with an ID of “chest01”.

Use the Move Camera At Speed function to focus on certain characters/events during a cutscene or to indicate to the player that something in the scene has changed.


Editor Node:

Visual Demo:

move_camera_at_speed.txt · Last modified: 2021/04/21 18:36 by justin