User Tools

Site Tools


move_camera_over_time

Differences

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

Link to this comparison view

Next revision
Previous revision
move_camera_over_time [2017/04/20 09:24] – external edit 127.0.0.1move_camera_over_time [2021/04/21 18:36] (current) justin
Line 2: Line 2:
 ---- ----
  
-Moves the camera to the specified (X,Y,Z) coordinate over the specified duration (in seconds). Camera must first be locked +Moves the camera to the specified (X,Y,Z) [[coordinate]] or named [[camera_positions|camera position]] over duration of time (in seconds). A target to aim the camera towards can optionally be specifiedIf using a [[camera_positions|camera position]] for the destinationthis "look at target" will override the angle.
- +
-Examples: Coordinate (0,0,8) will place the camera above the center of tile (0,0,0) at a height of 8 voxels, whereas coordinate (0.5, 0.5, 8) will place the camera at the same height but at the southeast corner of the tile instead of at the center.+
  
 +====Signature:====
 <code python> <code python>
-move_camera_over_time(coord[000], 1)+move_camera_over_time(destinationdurationlook_at_target)
 </code> </code>
  
 ^Argument^Description^Type^Required^ ^Argument^Description^Type^Required^
-|coord[0|Description.|[[String]]|Yes| +|destination|Destination coordinate or camera position.|[[Coordinate]] or [[String]]|Yes| 
-0|Description.|[[String]]|Yes| +|duration|Duration of the movement (in seconds).|[[Decimal]]|Yes| 
-0]|Description.|[[String]]|Yes+|look_at_target|Coordinate or entity to aim the camera towards.|[[Coordinate]] or [[Entity]]|No
-| 1|Description.|[[String]]|Yes|+ 
 +<WRAP center round info 100%> 
 +[[Lock Camera]] must be called before using this function to prevent the player from manually controlling the camera. 
 +</WRAP>
  
 ====Example:==== ====Example:====
-<code python+<code bauxite
-move_camera_over_time(coord[000], 1)+move_camera_over_time(coord[2232], 1, entity["chest01"]);
 </code> </code>
-//Results://+//Results:// The camera is moved to coordinate (2, 2, 32) and rotated to aim towards the entity with an ID of "chest01", all over a duration of one second.
  
 <WRAP center round tip 100%> <WRAP center round tip 100%>
-Use the **Move Camera Over Time** function to ...+Use the **Move Camera Over Time** 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>
  
Line 36: Line 38:
 <WRAP half column> <WRAP half column>
 ====Visual Demo:==== ====Visual Demo:====
-{{:wiki:move_camera_over_time_demo.gif?nolink|}}+{{:wiki:move_camera_at_speed_demo.gif?nolink|}}
 </WRAP> </WRAP>
 </WRAP> </WRAP>
move_camera_over_time.1492705486.txt.gz · Last modified: 2017/04/20 09:24 by 127.0.0.1