# Documentation for *cameraRTS* ## cameraRTS.Activate Activates the RTS camera.
void **cameraRTS.Activate**(int view) int view : set 1 for the first view. Set 0 to deactivate all the views. ## cameraRTS.GetCameraRotation Return the camera position and look-at if rotated on specified degrees
point point **cameraRTS.GetCameraRotation**(int yaw) int yaw : degrees _returns_ point pos, point look_at : position and look-at position of the camera. ## cameraRTS.GetEye Returns the camera position. (same as camera.GetPos([int view]) )
This position is futher modified by the zoom. To get the real camera pos use cameraRTS.GetFramePosLookAt().
point **cameraRTS.GetEye**([int view]) int view : optional, set 1 for the first view. _returns_ point : camera position or InvalidPos() on error ## cameraRTS.GetFramePosLookAt Return the exact camera position and look-at (position returned by camera.GetPos() is futher modified by the zoom)
point point **cameraRTS.GetFramePosLookAt**() _returns_ point pos, point look_at : position and look-at position of the camera. ## cameraRTS.GetHeight Returns the camera current height above the 'look at' position.
int **cameraRTS.GetHeight**() ## cameraRTS.GetHeightInterval Returns the camera minimal and maximal height above the ground.
int int **cameraRTS.GetHeightInterval**() _returns_ int min, int max : minimal and maximal height ## cameraRTS.GetLookAt Returns the camera look-at position
point **cameraRTS.GetLookAt**() _returns_ point : camera look-at position ## cameraRTS.GetLookatDist Returns the camera current look at ditance.
int **cameraRTS.GetLookatDist**() ## cameraRTS.GetPos Returns the camera position. (same as camera.GetEye([int view]) )
This position is futher modified by the zoom. To get the real camera pos use cameraRTS.GetFramePosLookAt().
point **cameraRTS.GetPos**([int view]) int view : optional, set 1 for the first view. _returns_ point : camera position or InvalidPos() on error ## cameraRTS.GetPosLookAt Returns camera position and 'look at' position of the camera.
This position is futher modified by the zoom. To get the real camera pos use cameraRTS.GetFramePosLookAt().
void **cameraRTS.GetPosLookAt**([int view]) int view : optional, set 1 for the first view _returns_ point pos, point look_at : camera position and 'look at' point ## cameraRTS.GetProperties Returns the camera properties in a table
table **cameraRTS.GetProperties**(int view) int view : set 1 for the first view ## cameraRTS.GetRotateCenter Returns the current rotation center point.
point **cameraRTS.GetRotateCenter**() _returns_ point : camera look-at position ## cameraRTS.GetRotationRadius Returns the low and high rotation radii
point point **cameraRTS.GetRotationRadius**() _returns_ point low, point high : low and high rotation radii ## cameraRTS.GetYaw Returns the camera yaw in degrees
int **cameraRTS.GetYaw**() ## cameraRTS.GetYawRestore Get the current YawRestore mode of the camera
bool **cameraRTS.GetYawRestore**() ## cameraRTS.GetZoom Changes the current zoom
int **cameraRTS.GetZoom**() _returns_ int zoom : zoom multiplied by 1000 ## cameraRTS.GetZoomLimits Returns the current zoom limits
int int **cameraRTS.GetZoomLimits**() _returns_ int min, int max : minimal an maximal zoom multiplied by 1000 ## cameraRTS.IsActive Check if the RTS person camera is active.
bool **cameraRTS.IsActive**() ## cameraRTS.IsMoving Return if the camera is moving
bool **cameraRTS.IsMoving**() ## cameraRTS.Rotate Rotate camera on specified degrees
void **cameraRTS.Rotate**(int yaw, int time) int yaw : degrees int time : time (ms) to interpolate to the new camera ## cameraRTS.SetCamera Set camera position and 'look at' point
void **cameraRTS.SetCamera**(point pos, point look_at, [int time], [int easing]) point pos : new position of the camera. point look_at : new look at position of the camera. int time : time (ms) to interpolate to the new camera int easing : interpolation parameter: 0 = "Linear",
1 = "CubicIn",
2 = "CubicOut",
3 = "CubicInOut",
4 = "QuinticIn",
5 = "QuinticOut",
6 = "QuinticInOut"
7 = "SinIn",
8 = "SinOut",
9 = "SinInOut",
## cameraRTS.SetCameraPrecise Set camera position and 'look at' point
void **cameraRTS.SetCameraPrecise**(point pos, point look_at, [int time]) point pos : new position of the camera multiplied by 1000. point look_at : new look at position of the camera multiplied by 1000. int time : time (ms) to interpolate to the new camera ## cameraRTS.SetProperties Sets camera properties from a given table
void **cameraRTS.SetProperties**(int view, table properties) int view : set 1 for the first view table prop : may contain the following fields: MinHeight, MaxHeight - sets the min and max height of the camera.
HeightInertia - the larger the number, the faster the camera height comes to rest when changed.
MoveSpeedNormal, MoveSpeedFast - normal and fast camera movement speed; fast is used when Ctrl is pressed.
RotateSpeed - the camera rotation speed.
LookatDist - 2D distance from the camera position to the 'look at' point.
LowRotationRadius, HighRotationRadius - radii of camera rotation when the camera is at the lowest and the highest position.
CameraYawRestore - 0 to toogle yaw restore off, 1 to toggle it on.
UpDownSpeed - the speed the camera moves vertically.
## cameraRTS.SetYawRestore Set the YawRestore mode of the camera. (the camera yaw is restored to 0)
void **cameraRTS.SetYawRestore**(bool restore) bool restore : enable or disable that mode ## cameraRTS.SetZoom Returns the current zoom
void **cameraRTS.SetZoom**(int zoom, [int time]) int zoom : zoom multiplied by 1000 int time : time (ms) to interpolate to the new zoom ## cameraRTS.SetZoomLimits Changes the zoom limits
void **cameraRTS.SetZoomLimits**(int min, int max) int min : minimal zoom multiplied by 1000 int max : maximal zoom multiplied by 1000 (insert footer.md.html here)