Creates a new InfluenceCamera instance
Unique identifier
VYLO Diob object
Initial X position
Initial Y position
Map name for the camera
Reference to the CameraManager
ProtectedboundsCamera position bounds (Infinity = no limit)
ProtectedcachedCached camera position to avoid object churn
ProtectedcachedCached gizmo position to avoid object churn
ProtectedcachedCached transition position to avoid object churn
VYLO Diob object representing the camera
ReadonlygizmoColor used for gizmo visualization (hex value)
The length of the gizmo line
ReadonlyidUnique identifier for this camera instance
Whether this camera is currently the active view eye
Reference to the CameraManager that owns this camera
ProtectedoperationIf true, this action ignores all time scale (global and camera)
ProtectedoperationPer-action override time scale (temporary), null when not set
The owner/target this camera belongs to (GameInstance or Vector2D) This represents who the camera is attached to or following
Current position of the camera in world space
Previous position of the camera in world space (used for velocity tracking)
The random angle for the gizmo
ProtectedtimeCamera-specific time scale multiplier (1.0 = normal)
Whether to track the target's Z position and subtract it from the Y position. Enabled by default. Useful for 2.5D isometric-style games where height (Z) affects screen Y.
ProtectedtransitionTransition duration for X axis in milliseconds
ProtectedtransitionTransition duration for Y axis in milliseconds
ProtectedtransitionEasing function for X axis transitions
ProtectedtransitionEasing function for Y axis transitions
ProtectedtransitioningWhether this camera is currently transitioning to become the view eye
ProtectedtransitionTransition progress (0-1) when becoming view eye
ProtectedtransitionStarting position for transitions
ProtectedtransitionTarget position for transitions
ProtectedtransitionElapsed time for current transition
ReadonlytypeCamera type identifier
Current velocity of the camera in pixels per second
Getter for gizmoEnabled property
Setter for gizmoEnabled property that notifies CameraManager
Getter for isActive property
Setter for isActive property that notifies CameraManager
Whether to track the view eye's Z position (alias for trackTargetZ)
ProtectedapplyProtectedclampGets the influence weight of a specific target
Target to check
Influence weight or 0 if not subscribed
Gets the owner/target this camera belongs to
The owner or null if not attached to anyone
Gets all current subscribers and their influence weights
Map of subscribers and their weights
ProtectedgetGets the Z value of a target if trackTargetZ is enabled, else returns 0. Used to subtract target height from Y position for 2.5D depth effects.
The target to get Z from
The target's z value, or 0 if tracking is disabled or target has no z
ProtectedgetProtectedgetGets the true camera position for a target (GameInstance or Vector2D) For GameInstance: returns center position (where camera should be) For Vector2D: returns the position directly Reuses cached object to avoid churn
Checks if a target is currently subscribed
Target to check
True if subscribed, false otherwise
ProtectedisChecks if a target is a Vector2D (has x, y properties but no mapName)
Target to check
True if target is Vector2D, false if GameInstance
Sets this camera as the active view eye.
Automatically performs a smooth seamless transition from the current view eye
using the manager's default transition settings (or custom options if provided).
Pass { duration: 0 } to force an immediate instant cut.
OptionalpOptions: TransitionCameraOptionsOptional transition options (duration, ease, matchVelocity, spring, etc.)
Sets camera position bounds (Infinity = no limit in that direction)
Minimum X position (use -Infinity for no limit)
Maximum X position (use Infinity for no limit)
Minimum Y position (use -Infinity for no limit)
Maximum Y position (use Infinity for no limit)
Sets the owner/target this camera belongs to
The owner to attach to
InfluenceCamera has its own movement API - setSettings should not be used Use subscribe/unsubscribe methods instead
Subscribes a target to influence this camera's position.
Each target can only be subscribed once. If already subscribed, this will update the influence weight.
GameInstance or Vector2D to subscribe
Influence weight (0.0+, where 1.0 = full influence, 2.0 = double influence)
Subscribes a target with equal distribution (auto-rebalanced)
GameInstance or Vector2D to subscribe
Unsubscribes a target from influencing this camera.
GameInstance or Vector2D to unsubscribe
Updates the influence weight for an existing subscriber. Sets manual mode (disables auto-rebalance)
GameInstance or Vector2D to update
New influence weight (0.0+, where 1.0 = full influence, 2.0 = double influence)
Protectedupdate
InfluenceCamera provides multi-target weighted following inspired by Pro Camera 2D.
This camera is not attachable to targets. Instead, it's created at a specific location and targets can be subscribed to influence its position. Each subscriber has a weight (0.0-1.0) that determines how much influence they have on the camera's position.
When no subscribers remain, the camera smoothly returns to its base location. Multiple targets can be subscribed simultaneously with different influence weights.
Example