LuaDoc_camera.md.html - yasumitsu/JaggedAlliance3Modding GitHub Wiki
Deactivate the current view camera.
void camera.Deactivate(int view) int view : set 1 for the first view. Set 0 to deactivate all the views.
int camera.GetAspect(int scale, [bool compute_real], [int view]) int view : 1 by default. Used to specify a view when the game is played in a split screen mode.
int scale : result is multiplied by this parameter
bool compute_real : aspect is calculated from horizontal and vertical FOV
returns int aspect : aspect multiplied by the scale parameter
Returns camera direction vector with length 1024.
point camera.GetDirection([int view]) int view : optional, set 1 for the first view.
Returns camera right vector with length 1024.
point camera.GetDirection([int view]) int view : optional, set 1 for the first view.
Returns camera up vector with length 1024.
point camera.GetDirection([int view]) int view : optional, set 1 for the first view.
Returns horizontal FOV in angular minutes.
int camera.GetFovX([int view]) int view : optional, set 1 for the first view.
Returns vertical FOV in angular minutes.
int camera.GetFovY([int view]) int view : optional, set 1 for the first view.
Returns camera pitch in angular minutes.
int camera.GetPitch([int view]) int view : optional, set 1 for the first view.
Returns the terrain area observed by the camera (a trapeze).
point point point point camera.GetViewArea() returns point left_top, point right_top, point right_bottom, point left_bottom : The four corners of the camera trapeze.
returns false, err : err could be "no scene" or "math error".
int camera.GetViewCount()
Return camera view render window box
box camera.GetViewport([int view]) int view : 1 by default. Used to specify a view when the game is played in a split screen mode.
Returns camera yaw in angular minutes.
int camera.GetYaw([int view]) int view : optional, set 1 for the first view
Returns if the camera is locked.
bool camera.IsLocked([int view]) int view : optional, set 1 for the first view.
Check if a game position is within the rendered view
bool camera.IsPointInView(int view, int margin, point pos) int view : 1 by default. Used to specify a view when the game is played in a split screen mode.
int margin : shrink the viewport box with that value
point pos : game position to check
Lock the current camera.
void camera.Lock([int view]) int view : optional, set 1 for the first view.
Specify auto adjustible FOV depend on the resolution aspect.
The FOV is linearly interpolated between minimal and maximal FOV depend on the current aspect.
For aspects lower than minimal aspect, horizontal FOV is fixed on the specified minimal FOV.
For aspects greater than maximal aspect, vertical FOV is fixed on the specified maximal FOV.
void camera.SetAutoFovX(int view, int time, int min_fovx, int min_resx, int min_resy, int max_fovx, int max_resx, int max_resy) int view : 1 by default. Used to specify a view when the game is played in a split screen mode.
int time : the time (ms) to change the FOV.
int min_fovx : horizontal FOV angle in minutes for the min aspect.
int min_resx : min resolution aspect x.
int min_resy : min resolution aspect y.
int max_fovx : horizontal FOV angle in minutes for the max aspect.
int max_resx : max resolution aspect x.
int max_resy : max resolution aspect y.
Set horizontal FOV. (the vertical FOV will be auto adjusted depend on the aspect ratio)
void camera.SetFovX(int angle, int time, [int view]) int angle : horizontal FOV angle in minutes.
int time : the time (ms) to change the FOV.
int view : optional, set 1 for the first view.
Set vertical FOV. (the horizontal FOV will be auto adjusted depend on the aspect ratio)
void camera.SetFovY(int angle, int time, [int view]) int angle : vertical FOV angle in minutes.
int time : the time (ms) to change the FOV.
int view : optional, set 1 for the first view.
void camera.SetViewCount(int count) int count : the number of views
Set camera view render window box
void camera.SetViewport([int view]) int view : 1 by default. Used to specify a view when the game is played in a split screen mode.
Unlock camera.
void camera.Unlock([int view]) int view : optional, set 1 for the first view.
(insert footer.md.html here)
<style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style><script src="markdeep.min.js" charset="utf-8"></script><script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script>