CameraOwnership
The camera handoff contract, reached through Flow.Camera.
A Camera track requests control of workspace.CurrentCamera when its first section enters and yields it
when its last section exits, including when the playback is stopped early or errors. While Flow holds
control the camera is Scriptable; the previous CameraType comes back when it lets go.
A game with its own camera system defers to Flow while it holds the camera and resumes afterwards:
local Flow = require(ReplicatedStorage.Flow)
Flow.Camera.OwnerChanged:Connect(function(newOwner)
MyCameraSystem:SetEnabled(newOwner == nil)
end)
MyCameraSystem:SetEnabled(not Flow.Camera.IsOwnedByFlow())
Owners stack. When two sequences hold the camera, the most recent one controls it, and control returns to the earlier one when it releases.
Properties
OwnerChanged
CameraOwnership.OwnerChanged: Signal<(newOwner: any?,newLabel: string?,previousOwner: any?)>
Fires whenever the controlling owner changes. newOwner is nil when Flow has let go of the camera. Owners
are opaque; the label is the playing sequence's name.
Functions
RequestControl
CameraOwnership.RequestControl(owner: any,label: string?) → boolean
Requests camera control for owner. The most recent requester controls the camera, and control returns to
the previous requester when it releases. Requesting again while already an owner does nothing.
ReleaseControl
CameraOwnership.ReleaseControl(owner: any) → ()Gives up owner's claim on the camera. Does nothing if it holds none.
SetSuspended
CameraOwnership.SetSuspended(suspended: boolean) → ()Hands the camera back to whatever normally drives it without releasing ownership. A paused editor preview suspends control so the camera can be posed for the next keyframe. Sequence writes still apply while suspended; they just no longer lock out other controllers.
IsSuspended
CameraOwnership.IsSuspended() → booleanGetOwner
CameraOwnership.GetOwner() → (any?,--
The controlling owner, or nil when Flow does not hold the camera
string?--
The owner's label
)IsOwnedByFlow
CameraOwnership.IsOwnedByFlow() → booleanReturns true while any sequence holds the camera, suspended or not.