This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rotate_camera [2017/05/05 16:03] – justin | rotate_camera [2017/05/07 16:27] – justin | ||
---|---|---|---|
Line 3: | Line 3: | ||
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. | 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. | ||
- | |||
- | <WRAP center round info 100%> | ||
- | [[Lock Camera]] must be called before using this function to prevent the player from manually controlling the camera. | ||
- | </ | ||
<code python> | <code python> | ||
Line 15: | Line 11: | ||
|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).|[[Decimal]]|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).|[[Decimal]]|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> | ||
- | rotate_camera(0, 0) | + | rotate_camera(-40, 0) |
</ | </ | ||
- | // | + | // |
<WRAP center round tip 100%> | <WRAP center round tip 100%> |