User Tools

Site Tools


rotate_camera

Differences

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

Link to this comparison view

Next revision
Previous revision
rotate_camera [2017/05/04 11:44] – external edit 127.0.0.1rotate_camera [2021/04/21 18:48] (current) justin
Line 2: Line 2:
 ---- ----
  
-Rotates the camera horizontally and/or vertically by the specified number of degrees (relative to the current view).+Rotates the camera horizontally and/or vertically by the specified number of degrees. 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(00)+rotate_camera(horizontal_anglevertical_angle)
 </code> </code>
  
 ^Argument^Description^Type^Required^ ^Argument^Description^Type^Required^
-|0|Description.|[[String]]|Yes| +|horizontal_angle|Angle by which to rotate the camera left or right (in degrees).|[[Number]]|Yes| 
-0|Description.|[[String]]|Yes|+|vertical_angle|Angle by which to rotate the camera up or down (in degrees).|[[Number]]|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
-rotate_camera(0, 0)+rotate_camera(-40, 0);
 </code> </code>
-//Results://+//Results:// The camera is immediately rotated 40 degrees to the left.
  
 <WRAP center round tip 100%> <WRAP center round tip 100%>
-Use the **Rotate Camera** function to ...+Use the **Rotate Camera** function to focus the camera towards an event taking place during a cutsceneThis is particularly useful in first-person mode since the camera rotations will be relative to the player's view.
 </WRAP> </WRAP>
  
rotate_camera.1493923442.txt.gz · Last modified: 2017/05/04 11:44 by 127.0.0.1