This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
rotate_camera_over_time [2017/05/07 16:27] – justin | rotate_camera_over_time [2020/05/06 10:14] – justin | ||
---|---|---|---|
Line 4: | Line 4: | ||
Rotates the camera horizontally and/or vertically by the specified number of degrees over a period of time (in seconds). The angles are relative to the current view. A positive horizontal angle will rotate the camera to the right and a negative horizontal angle will rotate the camera to the left. Likewise, a positive vertical angle will rotate the camera upwards and a negative vertical angle will rotate the camera downwards. | Rotates the camera horizontally and/or vertically by the specified number of degrees over a period of time (in seconds). The angles are relative to the current view. A positive horizontal angle will rotate the camera to the right and a negative horizontal angle will rotate the camera to the left. Likewise, a positive vertical angle will rotate the camera upwards and a negative vertical angle will rotate the camera downwards. | ||
+ | ====Signature: | ||
<code python> | <code python> | ||
rotate_camera_over_time(horizontal_angle, | rotate_camera_over_time(horizontal_angle, | ||
Line 9: | Line 10: | ||
^Argument^Description^Type^Required^ | ^Argument^Description^Type^Required^ | ||
- | |horizontal_angle|Angle by which to rotate the camera left or right (in degrees).|[[Decimal]]|Yes| | + | |horizontal_angle|Angle by which to rotate the camera left or right (in degrees).|[[Number]]|Yes| |
- | |vertical_angle|Angle by which to rotate the camera up or down (in degrees).|[[Decimal]]|Yes| | + | |vertical_angle|Angle by which to rotate the camera up or down (in degrees).|[[Number]]|Yes| |
- | |duration|Duration of the camera rotation (in seconds).|[[Decimal]]|Yes| | + | |duration|Duration of the camera rotation (in seconds).|[[Number]]|Yes| |
<WRAP center round info 100%> | <WRAP center round info 100%> | ||
Line 18: | Line 19: | ||
====Example: | ====Example: | ||
- | < | + | < |
rotate_camera_over_time(-40, | rotate_camera_over_time(-40, | ||
</ | </ | ||
Line 24: | Line 25: | ||
<WRAP center round tip 100%> | <WRAP center round tip 100%> | ||
- | Use the **Rotate Camera Over Time** function to ... | + | Use the **Rotate Camera Over Time** function to focus the camera towards an event taking place during a cutscene. This is particularly useful in first-person mode since the camera rotations will be relative to the player' |
</ | </ | ||