Trigger API Reference DCEI Functions Camera1 - funovus/editor-wiki GitHub Wiki
Table of Contents
- [Trigger API Reference\DCEI Functions\Camera (2/2)](#trigger-api-referencedcei-functionscamera-22)
* [Float2 GetCameraCurrentFocalPoint()](#float2-getcameracurrentfocalpoint)
* [Float2 GetCameraBoundsCenterPoint()](#float2-getcameraboundscenterpoint)
* [float GetCameraBoundsHeight()](#float-getcameraboundsheight)
* [float GetCameraBoundsWidth()](#float-getcameraboundswidth)
* [float GetCameraTargetPointMaxDistance(float x, float y)](#float-getcameratargetpointmaxdistancefloat-x-float-y)
* [void BlockCameraInput(bool set)](#void-blockcamerainputbool-set)
* [void BlockCameraInputForPlayer(int player, bool set)](#void-blockcamerainputforplayerint-player-bool-set)
* [void SetCameraVisibleAreaCenter(float x, float y)](#void-setcameravisibleareacenterfloat-x-float-y)
* [void SetCameraVisibleAreaWidth(float width)](#void-setcameravisibleareawidthfloat-width)
* [void SetCameraVisibleAreaLength(float length)](#void-setcameravisiblearealengthfloat-length)
* [void SetCameraVisibleAreaWidth(float width, bool updateMaxDistance)](#void-setcameravisibleareawidthfloat-width-bool-updatemaxdistance)
* [void SetCameraVisibleAreaLength(float length, bool updateMaxDistance)](#void-setcameravisiblearealengthfloat-length-bool-updatemaxdistance)
* [void SetCameraVisibleAreaCenterForPlayer(int player, float x, float y)](#void-setcameravisibleareacenterforplayerint-player-float-x-float-y)
* [void SetCameraVisibleAreaWidthForPlayer(int player, float width)](#void-setcameravisibleareawidthforplayerint-player-float-width)
* [void SetCameraVisibleAreaLengthForPlayer(int player, float length)](#void-setcameravisiblearealengthforplayerint-player-float-length)
* [void SetCameraVisibleAreaWidthForPlayer(int player, float width, bool updateMaxDistance)](#void-setcameravisibleareawidthforplayerint-player-float-width-bool-updatemaxdistance)
* [void SetCameraVisibleAreaLengthForPlayer(int player, float length, bool updateMaxDistance)](#void-setcameravisiblearealengthforplayerint-player-float-length-bool-updatemaxdistance)
|
Trigger API Reference\DCEI Functions\Camera (2/2) {Trigger-API-ReferenceDCEI-FunctionsCamera-22}
Float2 GetCameraCurrentFocalPoint()
Returns the coordinates of the camera's focal point.
local camera_center = DCEI.GetCameraCurrentFocalPoint()
DCEI.LogMessage("x: " .. camera_center.x .. " y: " .. camera_center.y)
Float2 GetCameraBoundsCenterPoint()
Returns the coordinates of the camera bounds' center point.
local camera_bounds_center = DCEI.GetCameraBoundsCenterPoint()
DCEI.LogMessage("x: " .. camera_bounds_center.x .. " y: " .. camera_bounds_center.y)
float GetCameraBoundsHeight()
Return the camera bounds height.
DCEI.LogMessage(DCEI.GetCameraBoundsHeight())
float GetCameraBoundsWidth()
Returns the camera bounds width.
DCEI.LogMessage(DCEI.GetCameraBoundsWidth())
float GetCameraTargetPointMaxDistance(float x, float y) {float-GetCameraTargetPointMaxDistancefloat-x-float-y}
float GetCameraTargetPointMaxDistance(float x, float y)
Returns the maximum distance the camera can be from the given coordinates.
DCEI.LogMessage(DCEI.GetCameraTargetPointMaxDistance(16, 0))
DCEI.LogMessage(DCEI.GetCameraTargetPointMaxDistance(16, 16))
void BlockCameraInput(bool set)
Toggles camera manipulation from player input.
DCEI.BlockCameraInput(true)
void BlockCameraInputForPlayer(int player, bool set) {void-BlockCameraInputForPlayerint-player-bool-set}
void BlockCameraInputForPlayer(int player, bool set)
Toggles camera manipulation from player input for the given player.
-
int
player
the player to toggle camera manipulation for. -
bool
set
if true, disables camera manipulation.
DCEI.BlockCameraInputForPlayer(1, true)
void SetCameraVisibleAreaCenter(float x, float y)
Moves the center of the camera visible area. This will move the players' camera(s) accordingly. This does not change the size of the camera's visible area. This can also 'overwrite' the effects of SetEnabledCameraClamp() if the new visible area covers previously blocked by camera clamping.
DCEI.SetCameraVisibleAreaCenter(1, 1)
void SetCameraVisibleAreaWidth(float width)
Sets the camera visible area's width. Functions as if bool updateMaxDistance
is set to true in the next function. Should be accompanied by SetCameraVisibleAreaLength().
DCEI.SetCameraVisibleAreaWidth(15)
void SetCameraVisibleAreaLength(float length)
Sets the camera visible area's length. Functions as if bool updateMaxDistance
is set to true in the next function. Should be accompanied by SetCameraVisibleAreaWidth().
DCEI.SetCameraVisibleAreaWidth(15)
DCEI.SetCameraVisibleAreaLength(15)
void SetCameraVisibleAreaWidth(float width, bool updateMaxDistance) {void-SetCameraVisibleAreaWidthfloat-width-bool-updateMaxDistance}
void SetCameraVisibleAreaWidth(float width, bool updateMaxDistance)
Sets the camera visible area's width. Should be accompanied by SetCameraVisibleAreaLength().
-
float
width
the new width for the camera visible area. -
bool
updateMaxDistance
if true, updates and sets the camera's max distance. Will instantly snap to the new max distance if true, otherwise the camera will attempt to zoom in to the new distance slowly. The most recent update will override any pervious updates.
DCEI.SetCameraVisibleAreaWidth(15, true)
void SetCameraVisibleAreaLength(float length, bool updateMaxDistance) {void-SetCameraVisibleAreaLengthfloat-length-bool-updateMaxDistance}
void SetCameraVisibleAreaLength(float length, bool updateMaxDistance)
Sets the camera visible area's length. Should be accompanied by SetCameraVisibleAreaWidth().
-
float
length
the new length for the camera visible area. -
bool
updateMaxDistance
if true, updates and sets the camera's max distance. Will instantly snap to the new max distance if true, otherwise the camera will attempt to zoom in to the new distance slowly. The most recent update will override any pervious updates.
DCEI.SetCameraVisibleAreaWidth(15)
DCEI.SetCameraVisibleAreaLength(15, true)
void SetCameraVisibleAreaCenterForPlayer(int player, float x, float y)
Moves the center of the camera visible area for the given player. This will move the player's camera(s) accordingly. This does not change the size of the camera's visible area. This can also 'overwrite' the effects of SetEnabledCameraClamp() if the new visible area covers previously blocked by camera clamping.
-
int
player
the player to set the camera for. -
float
x
the X-axis coordinate. -
float
y
the Z-axis coordinate.
DCEI.SetCameraVisibleAreaCenterForPlayer(1, -400, -400)
void SetCameraVisibleAreaCenterForPlayer(int player, float x, float y) {void-SetCameraVisibleAreaCenterForPlayerint-player-float-x-float-y}
void SetCameraVisibleAreaCenterForPlayer(int player, float x, float y)
Moves the center of the camera visible area for the given player. This will move the player's camera(s) accordingly. This does not change the size of the camera's visible area. This can also 'overwrite' the effects of SetEnabledCameraClamp() if the new visible area covers previously blocked by camera clamping.
-
int
player
the player to set the camera for. -
float
x
the X-axis coordinate. -
float
y
the Z-axis coordinate.
DCEI.SetCameraVisibleAreaCenterForPlayer(1, -400, -400)
void SetCameraVisibleAreaWidthForPlayer(int player, float width) {void-SetCameraVisibleAreaWidthForPlayerint-player-float-width}
void SetCameraVisibleAreaWidthForPlayer(int player, float width)
Sets the camera visible area's width for the given player. Functions as if bool updateMaxDistance
is set to true in the next function. Should be accompanied by SetCameraVisibleAreaLengthForPlayer().
DCEI.SetCameraVisibleAreaLengthForPlayer(1, 15)
DCEI.SetCameraVisibleAreaWidthForPlayer(1, 15)
void SetCameraVisibleAreaLengthForPlayer(int player, float length) {void-SetCameraVisibleAreaLengthForPlayerint-player-float-length}
void SetCameraVisibleAreaLengthForPlayer(int player, float length)
Sets the camera visible area's length for the given player. Functions as if bool updateMaxDistance
is set to true in the next function. Should be accompanied by SetCameraVisibleAreaWidthForPlayer().
-
int
player
the player to set the camera for. -
float
length
the new length for the camera visible area.
DCEI.SetCameraVisibleAreaLengthForPlayer(1, 15)
DCEI.SetCameraVisibleAreaWidthForPlayer(1, 15)
void SetCameraVisibleAreaWidthForPlayer(int player, float width, bool updateMaxDistance) {void-SetCameraVisibleAreaWidthForPlayerint-player-float-width-bool-updateMaxDistance}
void SetCameraVisibleAreaWidthForPlayer(int player, float width, bool updateMaxDistance)
Sets the camera visible area's width for the given player. Should be accompanied by SetCameraVisibleAreaLength().
-
int
player
the player to set the camera for. -
float
width
the new width for the camera visible area. -
bool
updateMaxDistance
if true, updates and sets the camera's max distance immediately. Will instantly snap to the new max distance if true, otherwise the camera will attempt to zoom in to the new distance slowly. The most recent update will override any pervious updates.
DCEI.SetCameraVisibleAreaLengthForPlayer(1, 15)
DCEI.SetCameraVisibleAreaWidthForPlayer(1, 15, false)
void SetCameraVisibleAreaLengthForPlayer(int player, float length, bool updateMaxDistance) {void-SetCameraVisibleAreaLengthForPlayerint-player-float-length-bool-updateMaxDistance}
void SetCameraVisibleAreaLengthForPlayer(int player, float length, bool updateMaxDistance)
Sets the camera visible area's length for the given player. Should be accompanied by SetCameraVisibleAreaWidthForPlayer().
-
int
player
the player to set the camera for. -
float
length
the new length for the camera visible area. -
bool
updateMaxDistance
if true, updates and sets the camera's max distance. Will instantly snap to the new max distance if true, otherwise the camera will attempt to zoom in to the new distance slowly. The most recent update will override any pervious updates.
DCEI.SetCameraVisibleAreaWidthForPlayer(1, 15)
DCEI.SetCameraVisibleAreaLengthForPlayer(1, 15, false)