PerspectiveCamera

Package: Libraries.Game.Graphics · Inherits from: Libraries.Language.Object, Libraries.Game.Graphics.Camera

Actions

GetFieldOfView()

This action will return the field of view of the camera to the given angle. The field of view is measured in degrees.

Returns

number

GetZoom()

The GetZoom action returns the current level of zoom used by the camera. The default value is 1.

Returns

number

Initialize(number field, number viewportWidth, number viewportHeight)

Initializes the camera by giving an angle in degrees to represent the field of view, as well as the width and height for the camera to show in virtual space.

Parameters

  • field number
  • viewportWidth number
  • viewportHeight number

SetFieldOfView(number angle)

This action will set the field of view of the camera to the given angle. The provided angle is assumed to be in degrees.

Parameters

  • angle number

SetZoom(number zoom)

The SetZoom action will set the zoom level of the camera. A value of 1 will use the default zoom. A smaller value will zoom the camera out, while a larger value will zoom the camera in.

Parameters

  • zoom number

Update()

This action recalculates the camera's position and data. This should be used after the camera has been manipulated in any way.

Inherited Actions

64 actions from Libraries.Game.Graphics.Camera
3 actions from Libraries.Language.Object