Advanced Camera

Dream it, build it!

Advanced Camera

Advanced camera plugin for Construct 3

This plugin is currently in development, and will soon be published for purchasing it on multiple asset stores like itchio and construct asset store, follow our social networks for more information.

Advanced Camera is a 2D plugin that creates a complex pre-programmed camera for you.

This plugin simplifies and enhances the process of creating a complex camera in your games. What is usually a task of inserting several behaviors and adding events is turned into a simple plug-n-play activity by inserting the plugin in the layout, you will have a fully functional and customizable camera with no additional programming required in just seconds.

The plugin is a world-plugin, which means you can add it to the layout and locate it using the UI making it cleaner to manage. You can also rotate and resize it using the UI. Havin a world plugin allows you to add multiple cameras in the same layout to switch between them as needed. Due the the nature of the plugin, you can only have one camera active at the same time, and alternate between them as neede in your design.

The plugin offers four camera modes, camera motions with easing, it is fully compatible with timelines, save/load, scenegraph hierarchy, and supports advanced minification exports as well as worker mode. The camera is also integrated with the common ACE's like the position, size and angle. When using the transformation ACEs to affect the size, position and angle, the camera will also update the rendering. For instance, if you set the camera angle to 45, all of the layers registered to be rotated will be automatically set to 45 degrees to with no additional effort.

The camera types offered by the plugin are:

  1. Stand Still Camera. A simple camera that is fixed in the layout.
  2. Scroll-To Camera. A camera that follows an object or a set of objects at the same time.
  3. BoxTrap Camera. A more stable camera that creates a bounding box that follows the player only when he/she leaves the box.
  4. Grid Camera. A zelda-like camera that creates a grid in your layout and automatically changes the area when the player leaves the occupied grid-cell.

All the camera styles available can work tracking multiple instances at the same time, when this happens, the camera tracks the average position of all of the objects that exist in the layout. You can also set if the tracking should be static, tracking the same number of instances as when the Set Tracking was called; dynamic tracking updates the list of objects to track in realtime, if an instance is destroyed or added to the layout, the tracker will update automatically.

The plugin also offers different motions executed with easing functions to Move-To a location, Rotate-To an angle and even Zoom to a target scale. The easing functions supported immediately gives a highly-polished look-and-feel to your game and all of the motion types are framerate independent.

General Properties

PropertiesDescription
Camera TypeSpecifies the camera type to use.
Debug ViewDisplays the bounding box of the camera during gameplay
EnabledSets the plugin enabled or disabled

Grid Camera Properties

PropertiesDescription
Show GridDisplays the grid. Only relevant for Grid Camera
Grid WidthGrid width. Only relevant for Grid Camera
Grid HeightGrid height. Only relevant for Grid Camera

Camera Limits Properties

PropertiesDescription
Clamp CameraPrevents the camera from going out of the specified bounding-box
Left LimitLeft limit in the X axis (left)
Top LimitTop limit in the Y axis (Top)
Bounding Box widthCamera displacement bounding-box width, starting from Left limit
Bounding Box heightCamera displacement bounding-box heigt, starting from Top limit

Actions


Set Debug

Set camera's debug quad enabled/disabled during gameplay

Set Camera Bounds

Sets the camera bounds and clamps its movement to the specified bounding-box.

ParameterDescription
LeftLeft Coordinate (X)
TopTop Coordinate (Y)
WidthCamera width
HeightCamera height

Move To

Moves the camera to the specified position applying an easing function. This an asynchronous action that allows you to add a Wait-for-previous-action-to-complete after it to sync your game animations. You can also use the trigger conditions for the same purpose.

ParameterDescription
XX Coordinate
YY Coordinate
TypeEasing function to apply to the movement
TimeTime in seconds to complete the movement
TagTag to identify the motion

Shake

Shakes the screen with a custom intensity function for a period of time. This an asynchronous action that allows you to add a Wait-for-previous-action-to-complete after it to sync your game animations. You can also use the trigger conditions for the same purpose.

ParameterDescription
MagnitudeMagnitude in pixels to shake the camera off
DurationDuration in seconds
TypeItensity function to use
TagTag to identify the shake
FrequencyShake cycles per second (Valid values:1 to 30). Only relevant when setting a Wave function.
WaveWave function to affect the screen shake offsetting

Set Tracking

Sets the tracking type for this camera.

  1. Stand Still Camera. A simple camera that is fixed in the layout.
  2. Scroll-To Camera. A camera that follows an object or a set of objects at the same time.
  3. BoxTrap Camera. A more stable camera that creates a bounding box that follows the player only when he/she leaves the box.
  4. Grid Camera. A zelda-like camera that creates a grid in your layout and automatically changes the area when the player leaves the occupied grid-cell.
ParameterDescription
Camera TypeSpecifies the camera type to use.

Ease transition

Sets the camera ease function to use when tracking an object

ParameterDescription
TypeEasing function to track the object
Step valueStep value for the linear interpolation of the camera

Track Object

Sets the objects to be tracked by the camera

ParameterDescription
ObjectObject to track
TypeTracking type. Dynamic tracking updates the objects in the layout every tick; Static tracking always tracks the picked instances at the moment of calling Track Object action.

Set Enabled

Activates/Deactivates the Advanced Camera plugin

ParameterDescription
EnabledIndicator to Enabled/Disabled the plugin

Switch Camera

Switches on the camera and disables all the AdvancedCamera instances found in the layout

Set Default Scale

Establishes the default scale for the registered layers and immediately adjusts all the layers.

ParameterDescription
ScaleDefault scale (min value is 0.1)

Set Default Angle

Establishes the default angle for the registered layers and immediately adjusts all the layers.

ParameterDescription
AngleDefault angle

Restore Camera

Restores the main transform properties of the camera setting its angle and scale back to the defaults values. If not changed, the default scale is 1 and the default angle is 0.

Restore Default Angle

Restores the angle of all the registered layers to the default angle and immediately adjusts all the layers.

Restore Default Scale

Restores the scale of all the registered layers to the default scale and immediately adjusts all the layers.

Stop Tracking

Stops tracking objects

Stop Zoom

Stops the running Zoom and marks it has completed, then it triggers the OnZoomFinished and OnAnyZoomFinished conditions

Stop Movement

Stops the running Move-To action and marks it has completed, then it triggers the OnMovementFinished and OnAnyMovementFinished conditions

Stop Rotation

Stops the running Rotate-To action and marks it has completed, then it triggers the OnRotationFinished and OnAnyRotationFinished conditions

Zoom

Zooms the registered layers to a target scale using an easing function. This an asynchronous action that allows you to add a Wait-for-previous-action-to-complete after it to sync your game animations. You can also use the trigger conditions for the same purpose.

ParameterDescription
ScaleTarget scale to zoom to (minimum possible scale is 0.1)
TimeTime in seconds to complete the zoom. Set it to zero for an instant Zoom.
TypeEasing function to apply
TagTag to identify the zoom

Add Zoom Layer

Registers a layer to be handled by the Zoom action.

ParameterDescription
LayerLayer name

Add Rotation Layer

Registers a layer to be handled by the rotation of the camera.

ParameterDescription
LayerLayer name

Rotate To

Rotates all the registered layers to the indicated angle. This action has no effect if no layers are registered with 'Add Rotation Layer' action. This an asynchronous action that allows you to add a Wait-for-previous-action-to-complete after it to sync your game animations. You can also use the trigger conditions for the same purpose.

ParameterDescription
AngleTarget angle to rotate to
TypeEasing function to apply
DirectionDirection of the rotation: clockwise or counter-clockwise.
TimeTime in seconds to complete the rotation
TagTag to identify the rotation

Pause Zoom

Pauses the current Zoom and marks it has uncompleted.

Pause Movement

Pauses the current Move-To running and marks it has uncompleted.

Pause Rotation

Pauses the current Rotate-To and marks it has uncompleted.

Resume Zoom

Resumes the last paused Zoom.

Resume Movement

Resumes the last paused Move-To.

Resume Rotation

Resumes the last paused Rotate-To.

Conditions


Is Enabled

Returns true if the camera is enabled

Is Moving

Returns true if the camera is moving by a Move To action

Is Tag Moving

Returns true if the camera is moving for the specified Tag by a Move To action

ParameterDescription
TagTag to identify the motion

On Movement Finished

Triggered when a Move-To action has completed

ParameterDescription
TagTag to identify the motion

On Any Movement Finished

Triggered when any Move-To action has completed

Is Rotating

Returns true if the camera is rotating by a Rotate To action

Is Tag Rotating

Returns true if the camera is rotating for the specified Tag by a Rotate To action

ParameterDescription
TagTag to identify the rotation

On Rotation Finished

Triggered when a Rotate-To action has completed

ParameterDescription
TagTag to identify the rotation

On Any Rotation Finished

Triggered when any Rotate-To action has completed

Is Zooming

Returns true if the camera is zooming by a Zoom action

Is Tag Zooming

Returns true if the camera is zooming for the specified Tag by a Zoom action

ParameterDescription
TagTag to identify the zoom

On Zoom Finished

Triggered when a zoom action has completed

ParameterDescription
TagTag to identify the zoom

On Any Zoom Finished

Triggered when any zoom action has completed

Is Shaking

Returns true if the camera is shaking

Is Tag Shaking

Returns true if the camera is shaking for the specified Tag by a Shake action

ParameterDescription
TagTag to identify the shake

On Shake Completed

Triggered when the specified shake action has completed

ParameterDescription
TagTag to identify the shake

On Any Shake Finished

Triggered when any shake action has completed

Expressions


GetZoomTag

Returns the tag forthe last Zoom called

GetShakeTag

Returns the tag for the last Shake called

GetMoveTag

Returns the tag for the last Move-To called

GetRotationTag

Returns the tag for the last Rotate-To called

GetMovementProgress

Returns current progress of the Move-To action (From 0 to 1)

GetZoomProgress

Returns current progress of the Zoom action (From 0 to 1)

GetRotationProgress

Returns current progress of the Rotate-To action (From 0 to 1)