ig.CONFIG.

CAMERA

Camera base configuration settings. IMPORTANT: Don't modify config directly! (see example)

Author:
  • Collin Hover - collinhover.com
Source:
// in order to add your own custom configuration to Impact++
// edit the file defining ig.CONFIG_USER, 'plusplus.config-user'
// ig.CONFIG_USER is never modified by Impact++ (it is strictly for your use)
// ig.CONFIG_USER is automatically merged over Impact++'s config

<static> AUTO_FOLLOW_PLAYER :Boolean

Whether camera should auto-follow player on level load and after player dies.

Default Value:
  • true
Source:

<static> BOUNDS_TRAP_AS_PCT :Boolean

Whether to automatically calculate ig.Camera#boundsTrap from percentages in ig.Camera#boundsTrapPct.

Default Value:
  • false
Source:

<static> BOUNDS_TRAP_MAXX :Number

Max x bound of camera in pixels, relative to center.

Default Value:
  • 0
Source:

<static> BOUNDS_TRAP_MAXY :Number

Max y bound of camera in pixels, relative to center.

Default Value:
  • 0
Source:

<static> BOUNDS_TRAP_MINX :Number

Min x bound of camera in pixels, relative to center.

Default Value:
  • 0
Source:

<static> BOUNDS_TRAP_MINY :Number

Min y bound of camera in pixels, relative to center.

Default Value:
  • 0
Source:

<static> BOUNDS_TRAP_PCT_MAXX :Number

Max x bound of camera as a percent of screen size, relative to center (i.e. -0.5 to 0.5 ).

Default Value:
  • 0
Source:

<static> BOUNDS_TRAP_PCT_MAXY :Number

Max y bound of camera as a percent of screen size, relative to center (i.e. -0.5 to 0.5 ).

Default Value:
  • 0
Source:

<static> BOUNDS_TRAP_PCT_MINX :Number

Min x bound of camera as a percent of screen size, relative to center (i.e. -0.5 to 0.5 ).

Default Value:
  • 0
Source:

<static> BOUNDS_TRAP_PCT_MINY :Number

Min y bound of camera as a percent of screen size, relative to center (i.e. -0.5 to 0.5 ).

Default Value:
  • 0
Source:

<static> CENTER_FIRST_FOLLOW :Boolean

Whether camera should center first followed entity of a level.

Default Value:
  • true
Source:

<static> KEEP_CENTERED :Boolean

Whether to keep camera centered always and ignore bounds.

Default Value:
  • true
Source:

<static> KEEP_INSIDE_LEVEL :Boolean

Whether to keep camera inside the level, preventing black borders.

Default Value:
  • false
Source:

<static> LERP :Number

How quickly to interpolate to target camera location, where 1 is instant.

Default Value:
  • 1
Source:
Example
// set to 1 to snap camera
camera.lerp = 1;
// set to 0.025 to move slowly and smoothly
camera.lerp = 0.025;

<static> SNAP_FIRST_FOLLOW :Boolean

Whether camera should snap, instead of transition, to first followed entity of a level.

Default Value:
  • true
Source:

<static> TRANSITION_DISTANCE :Number

Base distance to try to transition per duration.
- when set to 0, will not affect transition duration

Default Value:
  • 100
Source:

<static> TRANSITION_DURATION :Number

Duration of transition when switching entities that camera is following.

Default Value:
  • 1
Source:

<static> TRANSITION_DURATION_MAX :Number

Maximum duration of transition when switching entities that camera is following.

Default Value:
  • 2
Source:

<static> TRANSITION_DURATION_MIN :Number

Duration of transition when switching entities that camera is following.

Default Value:
  • 0.2
Source: