Trigger API Reference DCEI Functions Camera1 - BLKTower/TestWiki GitHub Wiki

Table of Contents

Trigger API Reference\DCEI Functions\Camera (2/2) {Trigger-API-ReferenceDCEI-FunctionsCamera-22}

Float2 GetCameraCurrentFocalPoint() {Float2-GetCameraCurrentFocalPoint}

Float2 GetCameraCurrentFocalPoint()

Description

Returns the coordinates of the camera's focal point.

Example Usage

local camera_center = DCEI.GetCameraCurrentFocalPoint()
DCEI.LogMessage("x: " .. camera_center.x .. " y: " .. camera_center.y)

Float2 GetCameraBoundsCenterPoint() {Float2-GetCameraBoundsCenterPoint}

Float2 GetCameraBoundsCenterPoint()

Description

Returns the coordinates of the camera bounds' center point.

Example Usage

local camera_bounds_center = DCEI.GetCameraBoundsCenterPoint()
DCEI.LogMessage("x: " .. camera_bounds_center.x .. " y: " .. camera_bounds_center.y)

float GetCameraBoundsHeight() {float-GetCameraBoundsHeight}

float GetCameraBoundsHeight()

Description

Return the camera bounds height.

Example Usage

DCEI.LogMessage(DCEI.GetCameraBoundsHeight())

float GetCameraBoundsWidth() {float-GetCameraBoundsWidth}

float GetCameraBoundsWidth()

Description

Returns the camera bounds width.

Example Usage

DCEI.LogMessage(DCEI.GetCameraBoundsWidth())

float GetCameraTargetPointMaxDistance(float x, float y) {float-GetCameraTargetPointMaxDistancefloat-x-float-y}

float GetCameraTargetPointMaxDistance(float x, float y)

Description

Returns the maximum distance the camera can be from the given coordinates.

Parameters

  • float x the X-axis coordinate.
  • float y the Z-axis coordinate.

Example Usage

DCEI.LogMessage(DCEI.GetCameraTargetPointMaxDistance(16, 0))
DCEI.LogMessage(DCEI.GetCameraTargetPointMaxDistance(16, 16))

void BlockCameraInput(bool set) {void-BlockCameraInputbool-set}

void BlockCameraInput(bool set)

Description

Toggles camera manipulation from player input.

Parameters

  • bool set if true, disables camera manipulation.

Example Usage

DCEI.BlockCameraInput(true)

void BlockCameraInputForPlayer(int player, bool set) {void-BlockCameraInputForPlayerint-player-bool-set}

void BlockCameraInputForPlayer(int player, bool set)

Description

Toggles camera manipulation from player input for the given player.

Parameters

  • int player the player to toggle camera manipulation for.
  • bool set if true, disables camera manipulation.

Example Usage

DCEI.BlockCameraInputForPlayer(1, true)

void SetCameraVisibleAreaCenter(float x, float y) {void-SetCameraVisibleAreaCenterfloat-x-float-y}

void SetCameraVisibleAreaCenter(float x, float y)

Description

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.

Parameters

  • float x the X-axis coordinate.
  • float y the Z-axis coordinate.

Example Usage

DCEI.SetCameraVisibleAreaCenter(1, 1)

void SetCameraVisibleAreaWidth(float width) {void-SetCameraVisibleAreaWidthfloat-width}

void SetCameraVisibleAreaWidth(float width)

Description

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().

Parameters

  • float width the new width for the camera visible area.

Example Usage

DCEI.SetCameraVisibleAreaWidth(15)

void SetCameraVisibleAreaLength(float length) {void-SetCameraVisibleAreaLengthfloat-length}

void SetCameraVisibleAreaLength(float length)

Description

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().

Parameters

  • float length the new length for the camera visible area.

Example Usage

DCEI.SetCameraVisibleAreaWidth(15)
DCEI.SetCameraVisibleAreaLength(15)

void SetCameraVisibleAreaWidth(float width, bool updateMaxDistance) {void-SetCameraVisibleAreaWidthfloat-width-bool-updateMaxDistance}

void SetCameraVisibleAreaWidth(float width, bool updateMaxDistance)

Description

Sets the camera visible area's width. Should be accompanied by SetCameraVisibleAreaLength().

Parameters

  • 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.

Example Usage

DCEI.SetCameraVisibleAreaWidth(15, true)

void SetCameraVisibleAreaLength(float length, bool updateMaxDistance) {void-SetCameraVisibleAreaLengthfloat-length-bool-updateMaxDistance}

void SetCameraVisibleAreaLength(float length, bool updateMaxDistance)

Description

Sets the camera visible area's length. Should be accompanied by SetCameraVisibleAreaWidth().

Parameters

  • 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.

Example Usage

DCEI.SetCameraVisibleAreaWidth(15)
DCEI.SetCameraVisibleAreaLength(15, true)

SetCameraVisibleAreaCenterForPlayer()

void SetCameraVisibleAreaCenterForPlayer(int player, float x, float y)

Description

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.

Parameters

  • int player the player to set the camera for.
  • float x the X-axis coordinate.
  • float y the Z-axis coordinate.

Example Usage

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)

Description

Parameters

Example Usage

void SetCameraVisibleAreaWidthForPlayer(int player, float width) {void-SetCameraVisibleAreaWidthForPlayerint-player-float-width}

void SetCameraVisibleAreaWidthForPlayer(int player, float width)

Description

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().

Parameters

  • int player the player to set the camera for.
  • float width the new width for the camera visible area.

Example Usage

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)

Description

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().

Parameters

  • int player the player to set the camera for.
  • float length the new length for the camera visible area.

Example Usage

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)

Description

Sets the camera visible area's width for the given player. Should be accompanied by SetCameraVisibleAreaLength().

Parameters

  • 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.

Example Usage

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)

Description

Sets the camera visible area's length for the given player. Should be accompanied by SetCameraVisibleAreaWidthForPlayer().

Parameters

  • 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.

Example Usage

DCEI.SetCameraVisibleAreaWidthForPlayer(1, 15)
DCEI.SetCameraVisibleAreaLengthForPlayer(1, 15, false)

⚠️ **GitHub.com Fallback** ⚠️