This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
move_camera_at_speed [2017/04/19 19:46] – justin | move_camera_at_speed [2017/05/02 16:26] – justin | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- | ---- | ||
- | Moves the camera to the specified (X,Y,Z) [[coordinate]] or named [[camera position]] at a particular speed (in voxels per second). A target to aim the camera towards can optionally be specified. If using a [[camera position]] for the destination, | + | Moves the camera to the specified (X,Y,Z) [[coordinate]] or named [[camera position]] at a particular speed (measured |
<code python> | <code python> | ||
- | move_camera_at_speed(coord[0, 0, 0], 120) | + | move_camera_at_speed(destination, speed, look_at_target) |
</ | </ | ||
^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| | + | |speed|Speed at which to move the camera (in voxels/sec).|[[Decimal]]|Yes| |
- | | 0]|Description.|[[String]]|Yes| | + | |look_at_target|Coordinate or entity to aim the camera towards.|[[Coordinate]] or [[Entity]]|No| |
- | | 120|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. | ||
+ | </ | ||
====Example: | ====Example: | ||
<code python> | <code python> | ||
- | move_camera_at_speed(coord[0, 0, 0], 120) | + | move_camera_at_speed(coord[2, 2, 32], 60, entity[" |
</ | </ | ||
- | // | + | // |
<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/ |
</ | </ | ||