User Tools

Site Tools


move_camera_at_speed

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
move_camera_at_speed [2017/04/19 19:54] justinmove_camera_at_speed [2021/04/21 18:36] (current) justin
Line 2: Line 2:
 ---- ----
  
-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.+Moves the camera to the specified (X,Y,Z) [[coordinate]] or named [[camera_positions|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_positions|camera position]] for the destination, this "look at target" will override the angle.
  
 +====Signature:====
 <code python> <code python>
 move_camera_at_speed(destination, speed, look_at_target) move_camera_at_speed(destination, speed, look_at_target)
Line 10: Line 11:
 ^Argument^Description^Type^Required^ ^Argument^Description^Type^Required^
 |destination|Destination coordinate or camera position.|[[Coordinate]] or [[String]]|Yes| |destination|Destination coordinate or camera position.|[[Coordinate]] or [[String]]|Yes|
-|speed|Speed at which the move the camera (voxels/second).|[[Decimal]]|Yes|+|speed|Speed at which to move the camera (in voxels/sec).|[[Decimal]]|Yes|
 |look_at_target|Coordinate or entity to aim the camera towards.|[[Coordinate]] or [[Entity]]|No| |look_at_target|Coordinate or entity to aim the camera towards.|[[Coordinate]] or [[Entity]]|No|
  
Line 18: Line 19:
  
 ====Example:==== ====Example:====
-<code python+<code bauxite
-move_camera_at_speed(coord[000], 120)+move_camera_at_speed(coord[2232], 60, entity["chest01"]);
 </code> </code>
-//Results://+//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".
  
 <WRAP center round tip 100%> <WRAP center round tip 100%>
-Use the **Move Camera At Speed** function to ...+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.
 </WRAP> </WRAP>
  
move_camera_at_speed.1492656878.txt.gz · Last modified: 2017/04/19 19:54 by justin