Skip to content

Built-in component reference

All built-ins register when src/game/components/index.js loads, in a fixed order. Component IDs are stable across scenes and blueprints — the engine persists them by ID, so existing scenes keep working as fields evolve.

Each component below lists its fields, actions (callable from Flow), conditions (checkable from Flow), events (Flow graph triggers), lifecycle hooks, and any cross-component dependencies. Fields marked hidden are internal and don't show in the inspector or Flow; fields marked output are read-only at runtime (engine-set state).

Browsing components in the editor

The Object Flow node picker lists every registered component — built-in plus your project components — grouped and sorted so attached ones float to the top.


Core

These components are on almost every object: rendering an image, moving it, and catching taps and drags.

Motion (motion)

Category: Core Description: Moves, tweens, springs, bounces, and smooths a Thing's transform.

Fields

FieldTypeDefaultNotes
springStiffnessnumber0.180–1; spring follow stiffness
springDampingnumber0.680–1; spring follow damping
dragStiffnessnumber0.520–1; stiffness while being dragged
dragDampingnumber0.580–1; damping while being dragged
scaleSmoothingnumber100 disables smoothing
rotationSmoothingnumber80 disables smoothing

Actions

ActionParamsBehavior
Move Tox, y, durationMs, easingTween position to (x, y) over durationMs.
Snap Tox, yInstantly set position; cancels any move tween.
Scale Tovalue, durationMs, easingTween scale to value.
Rotate Tovalue, durationMs, easingTween rotation to value.
Cancel TweensStop all tweens; snap targets to current.
Reset HomeReturn position/scale/rotation to home.
BounceamountScale-bounce effect sized by amount.
ShakedurationMs, intensityShake by oscillating scale/rotation with decay.

Easing values: easeOutQuad (default), easeInQuad, easeInOutQuad, easeOutBack, easeOutBounce, linear.

Conditions

ConditionTrue when
isMovingA move tween is active.
isAnimatingAny tween or bounce is active.

Events

EventPayload
Move Completex, y
Scale Completevalue
Rotation Completevalue
Shake CompletedurationMs, intensity

Lifecycle

  • onTick: Steps tweens, applies spring physics, runs shake/bounce, emits completion events.
  • onPlayStart / onPlayEnd / onDetach: Reset motion runtime state.

::: note When something is being dragged While thing.dragging is true, move tweens cancel and Motion swaps to dragStiffness/dragDamping. The Draggable component (and engine) sets that flag — you don't wire it. :::


Sprite Renderer (spriteRenderer)

Category: Core Description: Draws an image-backed sprite and controls render order, tint, source, flip, and opacity.

Most fields are kind: internal — they persist and serialize but are managed by the engine and the Studio actions below, so they're hidden from the inspector and Flow.

Fields (selected)

FieldTypeDefaultNotes
renderOrdernumber0Position inside the nearest Sorting Group.
tintcolor#ffffffFlat overlay color.
tintAmountnumber0Overlay strength (0 = off, 1 = solid).
assetSrcstring""hidden; resolved image source.
assetLibraryIdstring""hidden; source asset id.

Actions

ActionParamsBehavior
Appearstyle (fade/pop/scale), durationMs, delayMsShow sprite with an entrance animation.
Vanishstyle (fade/shrink), durationMs, delayMs, hide, markDoneFade/shrink out; optionally hide and/or mark done.
CollectdurationMsShrink + fade out, hide, mark done.
Set SpriteassetId, preserveSizeSwap sprite image to a library asset.
Set Flipflipped (Flip X), flipYMirror the sprite horizontally and/or vertically.
Set Alphavalue (0–1)Set sprite opacity.
Set Tintcolor, amount (0–1)Overlay a flat tint color on the sprite.

Conditions

ConditionTrue when
Has SpriteassetSrc or assetLibraryId is set.
Sprite Iscurrent sprite matches a given asset.
Is AnimatingAn appear/vanish tween is active.

Events

EventPayload
Appear Completestyle
Vanish Completestyle, hidden

Lifecycle

  • onAttach: Reloads with asset resolution.
  • onPlayStart: Initialises anim state, records home alpha/scale.
  • onTick: Steps appear/vanish tweens.

Sprite Animator (spriteAnimator)

Category: Core Description: Controls named animation states, sprite sequences, and automatic locomotion animation. Requires Sprite Renderer.

Fields (selected)

FieldTypeDefaultNotes
activeStatestring"idle"hidden; current Animation State.
stateSpritesobject{}hidden; Animation State name → sprite source.
stateSequencesobject{}hidden; Animation State name → sprite frames.
autoLocomotionStatesbooleanfalseAutomatically select locomotion states from a character controller.
idleState/walkState/runState/jumpState/fallState/landingStatestring"idle"hidden; locomotion role → Animation State name.
landingStateDurationMsnumber150How long the Landing State is held after touching down.

Actions

ActionParamsBehavior
Configure Locomotion Statesidle/walk/jump/fall/landing/run sprites and sequencesAssign locomotion sprites and looping sequences.
Play Animationsequence, loop, restorePlay a sprite animation; a one-shot may restore the prior state frame.
Set Idle/Walk/Run/Jump/Fall/Landing Statesprite, sequence, autoApplyBind a locomotion state's sprite or animation.
Set Locomotion StateroleSwitch to an authored locomotion state.
Set Automatic Locomotion StatesenabledToggle controller-driven locomotion states.
Set Animation StatestateSwitch to a named Animation State.

Conditions

Animation State Is, Locomotion State Is.

Events

EventPayload
State ChangedoldValue, newValue
Locomotion States Readycount, role
Animation Completename

::: note Automatic locomotion states When enabled, Sprite Animator reads an attached character controller to select Idle, Walk, Run, Jump, Fall, and Landing states without extra Flow wiring. :::


Sorting Group (sortingGroup)

Category: Core Description: Keeps this object and its visual descendants together in paint order so a character or prop doesn't interleave with unrelated sprites.

Fields

FieldTypeDefaultNotes
renderOrderint0Positions the whole group relative to neighboring renderers and groups

Sprite Renderer renderOrder is relative to the nearest Sorting Group ancestor.


Interactable (interactable)

Category: Core Description: Lets an object receive taps/clicks: its hit region, built-in tap action, and whether it blocks taps to objects behind it. This is the modern tap component — it's auto-added when you wire an "On Tap" graph.

Fields

FieldTypeDefaultNotes
enabledbooleantrueOff = ignores taps
hitAreaenum"sprite"sprite (opaque pixels), bounds (full rectangle), collider (collider shape)
blocksBehindbooleantrueOff lets taps pass through to objects behind
tapActionenum"none"none, bounce, sparkle, sound, spin, collect, toggle
tapOnlybooleanfalseOn draggable objects, register a quick tap instead of a drag
longPressbooleantrueEmit Long Pressed
doubleTapbooleantrueEmit Double Tapped

Actions

ActionParamsBehavior
Set Tap Actionaction (enum)Set the built-in tap reaction.
Clear Tap ActionSet tapAction to none.
Set TappableenabledEnable/disable tap reception.

Conditions

ConditionTrue when
Is Tappableenabled is not false.
hasActiontapAction is not none.
Action IstapAction matches a given value.

Events

EventPayload
Tappedpointer
Double Tappedpointer
Long Pressedpointer

Tappable (tappable) — legacy

Category: Core Description: Predecessor of Interactable. Still registered so older scenes and blueprints load, but new work should use Interactable. Most fields and events mirror Interactable; it lacks hitArea and blocksBehind.

Fields

FieldTypeDefaultNotes
actionenum"none"none, bounce, sparkle, sound, spin, collect, toggle
tapOnlybooleanfalseOn draggable objects, register a quick tap instead of a drag
longPressbooleantrueEmit Long Pressed
doubleTapbooleantrueEmit Double Tapped

Events

Tapped, Double Tapped, Long Pressed — payload pointer.

::: note Migrating to Interactable Open the object, remove Tappable, and add Interactable. The same tapAction, longPress, and doubleTap options carry across; pick a hitArea (sprite is the old default). :::


Draggable (draggable)

Category: Core Description: Lets an object be dragged, axis-constrained, and dropped onto Drop Zones.

Fields

FieldTypeDefaultNotes
axisenum"free"free, x, y
boundsenum"none"none, stage
moveThresholdnumber6Pixels the pointer must travel before a drag starts
pickUpScalenumber1.12Scale while held

Actions

ActionParamsBehavior
Set Drag Axisaxis (free/x/y)Constrain dragging axis.
Set Drag Boundsbounds (none/stage)Set stage bounds.
Set Pick-up ScalevalueSet scale while held.

Conditions

ConditionTrue when
isDraggingthing.dragging is truthy.
constrainedToStagebounds is stage.
Axis Isaxis matches.

Events

EventPayload
Drag Startedpointer
Drag Movedpointer, deltaX, deltaY
Drag Endedpointer
DroppedotherId, targetId, dropX, dropY

::: note Drop Zones resolve targets The Dropped event carries otherId/targetId resolved from nearby Drop Zones. The engine sets thing.dragging, which Motion reads to switch to drag tuning — no wiring required. :::


Drop Zone (dropZone)

Category: Core Description: Marks an object as a target area for drops and proximity checks.

Fields

FieldTypeDefaultNotes
radiusnumber110Proximity threshold in pixels

Actions

ActionParamsBehavior
Set RadiusvalueSet the zone radius.

Conditions

ConditionTrue when
hasRadiusradius > 0
Radius At Leastradiusvalue

Events

EventPayload
EnteredotherId, pointer
ExitedotherId, pointer
Dropped OnotherId, droppedId, dropX, dropY

Control

Character controllers drive locomotion. The engine is shared (character-controller-core.js); three flavors expose it with different movement models. Set controlledBy to player, flow, ai, or network to choose who drives it.

Platformer Controller (platformerController)

Category: Control Description: Side-view locomotion with gravity, jumping, coyote time, jump buffering, and ground-aware foot probes.

Fields

FieldTypeDefaultNotes
enabledbooleantrue
controlledByenum"player"player, flow, ai, network
maxSpeednumber220px/s
accelerationnumber900px/s²
frictionnumber1200px/s²
airAccelerationnumber700px/s²
airFrictionnumber160px/s²
gravitynumber1800px/s²
terminalVelocitynumber1400px/s
jumpSpeednumber620px/s
maxJumpsint12 = double jump
variableJumpHeightbooleantrueCut upward velocity when jump released early
variableJumpMinPercentnumber0.4Fraction of full jump retained
coyoteTimenumber0.08Seconds after leaving ground a jump still works
jumpBufferTimenumber0.08Seconds a queued jump waits before landing
useStageFloorbooleantrueLand on the bottom of the stage
floorYnumber0Custom floor Y when useStageFloor is off
collideWithWorldbooleanfalseUse physics colliders
clampToStagebooleanfalseKeep inside the stage
arrivalRadiusnumber8px to count as "arrived" for Move Toward
footProbe*Foot probing: showFootProbes, footProbeSpread, footProbeInset, footProbeLeftX/RightX, footProbeDepth, footProbeLift, footProbeYOffset, footProbeMode (leading/…), footProbeSpeed
rotateSpritebooleanfalseFlip sprite horizontally to face movement
jumpKeystring"Space"
leftKey/rightKey/upKey/downKeystringArrow keys
wasdbooleantrueAlso accept WASD
movingbooleanfalseoutput
facingenum"right"output; 8-directional
grounded / jumping / fallingbooleanfalseoutput

Actions

ActionParamsBehavior
Set Move Inputx, ySet persistent movement intent.
Move Directionx, ySet movement direction intent.
Move Towardx, y, stopWithinMove toward a point; emits Arrived on arrival.
Clear Move TargetClear the move-to target.
StophaltVelocityStop; optionally halt velocity.
Set SpeedvalueSet maxSpeed.
Set Controller EnabledenabledEnable/disable.
Set Facing / Face Directiondirection / x, ySet facing.
JumpstrengthQueue a jump.

Conditions

ConditionTrue when
Can Moveenabled is true.
Is Moving / Is Idlemoving is true / false.
Has Move TargetA move-to target exists.
Facing Isfacing matches.
Is Grounded / Is Airbornegrounded is true / false.
Is Fallingfalling is true.
Can JumpEnabled and has a ground jump or remaining jumps.

Events

EventPayload
Move Started / Move Stoppedx, y, vx, vy, speed
Direction Changed / Facing Changeddirection, x, y
Arrivedx, y
Jumpedx, y, vx, vy, jumpsUsed
Landed / Left Groundx, y, vx, vy

Top-Down Controller (topDownController)

Category: Control Description: Free-plane movement in all directions, with optional diagonal movement and turn-to-face.

Fields

FieldTypeDefaultNotes
enabledbooleantrue
controlledByenum"player"player, flow, ai, network
maxSpeednumber220px/s
accelerationnumber900px/s²
frictionnumber1200px/s²
allowDiagonalbooleantrueOff = 4-way cardinal only
turningenum"none"none, instant, smooth
rotateSpritebooleanfalseRotate sprite toward movement
collideWithWorld / clampToStagebooleanfalse
arrivalRadiusnumber8
left/right/up/downKey, wasdSame input fields as Platformer
movingbooleanfalseoutput
facingenum"right"output

Actions & Conditions

Same shared action/condition set as Platformer (Set Move Input, Move Direction, Move Toward, Clear Move Target, Stop, Set Speed, Set Controller Enabled, Set Facing, Face Direction; conditions Can Move, Is Moving, Is Idle, Has Move Target, Facing Is). No jump, ground, or air actions.

Events

Move Started, Move Stopped, Direction Changed, Facing Changed, Arrived.


Side-Scroller Controller (sideScrollerController)

Category: Control Description: Horizontal-focused movement (no gravity), with an optional vertical axis. Flips the sprite to face travel.

Fields

FieldTypeDefaultNotes
enabledbooleantrue
controlledByenum"player"player, flow, ai, network
maxSpeednumber220px/s
accelerationnumber900px/s²
frictionnumber1200px/s²
sideScrollerVerticalbooleanfalseAlso allow up/down movement
rotateSpritebooleanfalseFlip sprite horizontally to face movement
collideWithWorld / clampToStagebooleanfalse
arrivalRadiusnumber8
left/right/up/downKey, wasdSame input fields as Platformer
movingbooleanfalseoutput
facingenum"right"output

Actions, Conditions & Events

Same shared action/condition/event set as Top-Down. No jump.

Driving a controller with AI

Set the controller's controlledBy to ai and add AI Mover — it drives moveDirection/moveToward/stop for you. For Flow-driven control, set controlledBy to flow and call Move Direction/Move Toward from graphs.


AI Mover (aiMover)

Category: Control Description: Drives a character controller set to controlledBy: ai to patrol, follow, or flee — no Flow wiring needed.

Fields

FieldTypeDefaultNotes
enabledbooleantrue
behaviorenum"patrol"patrol, follow, flee, idle
targetobjectRef""Object to follow or flee
detectRangenumber0px; 0 = always active
patrolDistancenumber96px from spawn point
patrolAxisenum"horizontal"horizontal, vertical
stopWithinnumber8How close to stop when following
seesTargetbooleanfalseoutput; true while target within detect range

Actions

ActionParamsBehavior
Set BehaviorbehaviorSet patrol/follow/flee/idle.
Set TargettargetSet the follow/flee target.
Set EnabledenabledEnable/disable AI movement.

Conditions

ConditionTrue when
Has Targettarget resolves to a live object.
Sees TargetseesTarget is true.

Events

Target Spotted, Target Lost (no payload).

::: note Requires a character controller AI Mover locates any character controller on the same object each tick and drives it. The controller must be set to Controlled By: AI. :::


Combat

Health (health)

Category: Combat Description: Tracks HP, applies damage and healing, emits lifecycle events.

Fields

FieldTypeDefaultNotes
hpnumber30Current HP (min 0)
maxHpnumber30Maximum HP (min 1)
invulnerablebooleanfalseBlocks damage
resetOnPlaybooleantrueRefill to maxHp on play start

Events

EventPayload
damagedamount, remainingHp
healedamount, remainingHp
diedremainingHp (0)

Actions

ActionParamsBehavior
damageamountSubtract HP; emit damaged; emit died at 0.
healamountAdd HP up to maxHp; emit healed.
setHpvalueClamp and emit damaged/healed/died as needed.
setMaxHpvalue, adjustCurrentRaise/lower max HP; optionally clamp current.
refillSet HP to maxHp.
killForce HP to 0; emit died.

Conditions

ConditionParamsTrue when
isDeadHP ≤ 0
isAliveHP > 0
isAtFullHP ≥ maxHp
hpAtLeastvalueHP ≥ value
hpBelowvalueHP < value

Lifecycle

  • onAttach: Clamps HP to maxHp if needed.
  • onPlayStart: Refills HP when resetOnPlay is true.

Stats (stats)

Category: Combat Description: Attack, defense, and speed with temporary bonuses.

Fields

FieldTypeDefaultNotes
atknumber5Base attack
defnumber1Base defense
spdnumber5Base speed (used by Turn Queue)
atkBonus / defBonus / spdBonusnumber0Hidden modifiers

Effective values in logic: base + bonus.

Events

EventPayload
statChangedstat, oldValue, newValue

Actions

ActionParams
addModifierstat (atk/def/spd), amount
setBasestat, value
clearModifiers

Conditions

ConditionParams
fasterThanother (objectRef) — compares effective speed to another object's Stats; falls back to otherSpd when empty

Ability Cooldown (abilityCooldown)

Category: Combat Description: Timed gate for abilities; counts down each frame.

Fields

FieldTypeDefault
durationnumber1.5 (seconds)
remainingnumber0 (read-only)
autoStartbooleanfalse

Events

used, ready.

Actions

ActionReturns
usefalse if still cooling; otherwise starts timer and emits used
forceReadyClears remaining; emits ready
setDurationvalue — updates duration

Conditions

canUse (remaining ≤ 0), isCoolingDown.

Lifecycle

  • onPlayStart: Sets remaining from autoStart.
  • onTick: Decrements remaining; emits ready when it hits zero.

Combat Action (combatAction)

Category: Combat Requires: statsDescription: Applies stat-based attacks to another object's Health.

Damage formula: attacker atk + atkBonus + power + bonusPower − target def/defBonus, clamped to minimum damage. Friendly fire is blocked unless enabled.

Fields

FieldTypeDefault
powernumber0
minDamagenumber1
variancenumber0
useDefensebooleantrue
allowFriendlyFirebooleanfalse

Events

attacked (attackerId, targetId, amount), blocked (attackerId, targetId, reason).

Actions

ActionParams
attacktargetId, power, minDamage, optional endTurn + turnQueueId

Conditions

canAttack — target exists, has Health above 0, and is not an ally unless friendly fire is enabled.


Turn Queue (turnQueue)

Category: Combat Description: Cycles turns across objects in a named Group. Attach to a controller object; fighters share the same group string on their Thing.

Fields

FieldTypeDefaultNotes
groupstring""Scene group name (e.g. Combatants)
orderenum"registered"registered, speedDesc, random
skipDefeatedbooleantrueIgnore visible members whose Health is 0
stopWhenOneTeambooleantrueEnd a multi-team battle once one team remains
activeIdstringhidden; current actor object id
queuestringhidden; comma-separated id queue
indicatorIdobjectRef""Optional arrow/marker snapped above the active combatant
indicatorOffsetYnumber-48Gap used for automatic indicator placement

Events

turnStart (actorId), turnEnd (actorId), roundStart, queueEmpty, battleEnd (winningTeam).

Actions

ActionDescription
rebuildCollect visible group members and rebuild queue.
nextEnd current turn, advance; auto-rebuild if empty; may emit roundStart; moves indicatorId when set.
positionIndicatorSnap marker above the active combatant (marker, offsetY).

Conditions

isActive — compares activeId to a given object ref.

Ordering

  • speedDesc: Sort by Stats spd (higher first).
  • random: Shuffle member ids.
  • registered: Scene order of members.

Team (team)

Category: Combat Description: Faction tag for ally/enemy checks in graphs.

Fields

FieldTypeDefaultNotes
namestring"neutral"e.g. player, enemy

Actions

setTeamvalue (string).

Conditions

ConditionParams
isAllyother (objectRef) — same team name
isEnemyother — different non-empty team

Health Bar (healthBar)

Category: UI Requires: healthDescription: Draws an HP bar above the object.

Fields

FieldTypeNotes
width, heightnumberBar size
offsetYnumberVertical offset above sprite
showWhenFullbooleanHide bar at full HP
showOnHoverbooleanShow on pointer hover or after damage
fillColor, bgColor, lowColorcolorBar colors
lowThresholdnumber0–1 fraction for "low HP" color
flashOnHitbooleanBrief flash on damage
visiblebooleanhidden; runtime visibility

Events

barShown, barHidden.

Actions

show, hide, flash.

Conditions

isVisible.

Sibling handlers

Reacts to Health on the same object without extra graph wiring:

Handler keyBehavior
health.damagedFlash bar; show if showOnHover.
health.diedHide bar.

Hazard (hazard)

Category: Combat Requires: collider2d (auto-attached) Description: Damages objects that touch it (targets need Health). Auto-adds a sensor Collider 2D.

Fields

FieldTypeDefaultNotes
damagenumber1HP removed per hit
targetGroupstring""Only objects in this group/team take damage; empty = anyone with Health
continuousbooleanfalseKeep damaging on interval while in contact
intervalnumber0.5Seconds between hits when continuous
destroySelfbooleanfalseVanish after dealing damage (projectiles)

Events

EventPayload
Hurt SomethingtargetId, targetName, amount

::: note How it hurts Hazard runs the target's health.damage action on each qualifying contact. With continuous off, it damages a given target once per contact; with it on, every interval seconds while still touching. :::


Items

Inventory (inventory)

Category: Items Description: Named item stacks (serialized as an internal string map).

Fields

FieldTypeDefaultNotes
capacitynumber99Max distinct item types
itemsstring""Read-only encoded stacks

Events

itemAdded, itemRemoved, full.

Actions

ActionParams
additem, count
removeitem, count
clear

Conditions

has (item), hasAtLeast (item, count).


Pickup (pickup)

Category: Items Requires: collider2d (auto-attached) Description: Collectible: when a qualifying object overlaps it, fires Collected and vanishes. Auto-adds a sensor Collider 2D.

Fields

FieldTypeDefaultNotes
collectorGroupstring""Only objects in this group/team can collect; empty = anyone
pointsnumber1Score value in the Collected payload
vanishbooleantrueHide on collect (uses Sprite Renderer's collect animation if present)
collectedbooleanfalseoutput; true once picked up

Actions

ActionBehavior
ResetMake the pickup collectible again and show it.

Conditions

Is Collectedcollected is true.

Events

EventPayload
CollectedbyId, byName, points

::: note Vanish animation On collect, Pickup runs the Sprite Renderer collect action if one is present on the same object; otherwise it hides and marks done directly. :::


Logic

Timer (timer)

Category: Logic Description: Counts down and fires Completed when it elapses. Loops on demand. Drive it from Flow or auto-start on play.

Fields

FieldTypeDefaultNotes
durationnumber1seconds
autoStartbooleantrueStart counting when play starts
loopbooleanfalseRestart automatically on completion
runningbooleanfalseoutput
elapsednumber0output; seconds counted
remainingnumber0output; seconds left

Actions

ActionBehavior
StartStart or resume.
RestartReset to zero and start.
StopPause where it is.
ResetStop and clear elapsed to zero.
Set DurationSet duration in seconds.

Conditions

Is Running, Is Done (not running, elapsed ≥ duration, duration > 0).

Events

EventPayload
Startedduration
Completedduration
Loopedcount

Spawner (spawner)

Category: Control Description: Spawns a prefab on an interval at this object's position. Great for enemy waves, obstacles, and pickups.

Fields

FieldTypeDefaultNotes
enabledbooleantrue
prefabassetRef""Prefab asset to spawn (assetKind: blueprint)
intervalnumber1.5seconds between spawns
autoStartbooleantrueBegin spawning on play start
spawnOnStartbooleanfalseEmit first spawn immediately
limitint0Max spawns; 0 = unlimited
offsetX / offsetYnumber0Spawn offset from this object
runningbooleanfalseoutput
spawnCountnumber0output; total spawned this play

Actions

ActionBehavior
StartStart the spawner.
StopStop the spawner.
ResetClear spawn count for a fresh limit.
Spawn NowSpawn one prefab immediately, ignoring interval.

Conditions

Is Spawningrunning is true.

Events

EventPayload
Spawnedprefab, x, y, count
Finishedcount

Prefabs are assets

Spawner spawns a prefab — a reusable object blueprint. Author the object once, save it as a prefab, then point prefab at it.


Physics (2D)

See the Physics guide for setup, coordinates, and troubleshooting.

Rigid Body 2D (rigidBody2d)

Category: Physics Description: Simulates mass and velocity. Requires Collider 2D to collide with other objects.

Fields (selected)

FieldTypeDefaultNotes
bodyTypeenum"dynamic"dynamic, fixed, kinematicPosition, kinematicVelocity
gravityScalenumber10 disables gravity for this body
linearDampingnumber0Slows linear motion
lockRotation / lockX / lockYbooleanfalseAxis locks
vx, vy, speed, sleepingRead-only at runtime

Events

collisionStart, collisionEnd — payload: otherId, otherName, started, sensor.

Actions

setVelocity, addVelocity, applyImpulse, setAngularVelocity, teleport, setBodyType, setEnabled, wake, sleep.

Conditions

isDynamic, isKinematic, isMoving, isSleeping.


Collider 2D (collider2d)

Category: Physics Description: Collision shape for Rapier. Collider-only attachments become implicit fixed bodies (floors, walls).

Fields (selected)

FieldTypeDefaultNotes
shapeenum"box"box, circle, capsule
useObjectSizebooleantrueMatch sprite bounds
sensorbooleanfalseTrigger only — no physical push
frictionnumber0.7Surface friction
restitutionnumber0Bounce (0–1)
colliding, contactCountRead-only at runtime

Events

Same collision events as Rigid Body 2D.

Actions

setSensor, setEnabled.

Conditions

isSensor, isColliding, hasContacts.


Joint 2D (joint2d)

Category: Physics Description: Connects this object's rigid body to another with a hinge, weld, or distance joint. Both objects need Rigid Body 2D (and usually Collider 2D).

Fields

FieldTypeDefaultNotes
enabledbooleantrue
targetobjectRef""Other object this joint connects to
typeenum"revolute"revolute (hinge), fixed (weld), distance (rope/spring)
anchorX / anchorYnumber0Body-local pixels (0,0 = centre)
targetAnchorX / targetAnchorYnumber0Target body-local
limitMin / limitMaxnumber-180 / 180Degrees; revolute only
motorSpeednumber0rad/s; revolute only
motorForcenumber0revolute only
restLengthnumber0distance joint natural length; 0 = capture current separation
stiffnessnumber00 = rope (max length only), >0 = spring
collideConnectedbooleanfalseAllow connected bodies to collide
breakForcenumber0Max anchor separation (px) before break; 0 = unbreakable

Actions

ActionParamsBehavior
Set EnabledenabledEnable/disable; releases physics on disable.
Break JointDisable and release the joint.
Set Limitsmin, maxSet hinge angle limits (revolute).
Set Motorspeed, forceSet motor speed/force (revolute).

Events

BrokeotherId, force.


Ragdoll (ragdoll)

Category: Physics Description: Makes a skinned skeleton go limp using physics bones authored in Skeleton Studio. Activate on death or via action.

Fields

FieldTypeDefaultNotes
enabledbooleantrue
activateOnDeathbooleantrueActivate ragdoll when Health dies
activebooleanfalseread-only; currently limp
blendBacknumber0Reserved for future blend-back

Actions

ActionParamsBehavior
ActivateSpawn bone bodies at the current animated pose and go limp; stops skeleton clips.
DeactivateFree bone bodies; bones keep last limp pose.
Impulse BoneboneId, x, yApply a linear impulse to one physics bone.

Events

EventPayload
Activated
Bone HitboneId, otherId, otherBoneId

::: note Activates on death With activateOnDeath on, Ragdoll listens for the Health died sibling event and activates automatically. :::


Projectile (projectile)

Category: Physics Description: Arrow / bolt / dart flight: points along velocity while flying and can weld into what it hits. Requires dynamic Rigid Body 2D + Collider 2D. Enable Continuous Collision on the rigid body so fast shots don't tunnel.

Fields (selected)

FieldTypeDefaultNotes
enabledbooleantrue
alignToVelocitybooleantrueFace direction of travel each tick
minAlignSpeednumber30px/s; skip alignment when slower
turnSpeednumber0deg/s; 0 = snap instantly
angleOffsetnumber0Degrees if art doesn't point +X at rotation 0
stickOnHitbooleantrueWeld into first solid hit (sensors never stick)
ignoreOwnerbooleantrueNever stick to the spawner / owner hierarchy
stickGroup / ignoreGroupstring""Optional group filters
armDelaynumber80ms before sticking arms (avoids welding to shooter on spawn)
breakForcenumber0Max anchor separation (px) before tear-free; 0 = stuck for good
stuck / stuckToIdoutput

Actions

ActionParamsBehavior
Launchspeed, angleFire along facing (or explicit angle); unsticks first and re-arms stick delay
UnstickRelease the weld
Set OwnertargetIdAssign who fired this (spawned projectiles get owner automatically)

Conditions

Is Stuck

Events

EventPayload
StuckotherId, otherName
UnstuckotherId, reason

Scene

Scene Camera (scene_camera)

Category: Scene Description: Where the viewport opens when you play: position, zoom, optional follow target, and an editor preview guide.

Fields

FieldTypeDefaultNotes
zoomnumber10.75–2.2
followInPlaybooleanfalseKeep the camera centred on the follow target during play
previewFramebooleantrueDraw the viewport guide overlay in the editor
followTargetIdobjectRef""Object to track when followInPlay is on
isDefaultbooleanfalseMake this the active camera on scene start

Actions

ActionParamsBehavior
Set ZoomvalueSet zoom, clamped to 0.75–2.2.
Follow ObjecttargetId, followInPlaySet follow target; optionally enable follow.
Clear FollowClear target and disable follow.
Reset cameraMove to stage centre, reset zoom to 1, clear follow, enable preview.

Conditions

isDefault, hasFollowTarget.

::: note One default camera Set isDefault on the camera you want active when the scene starts. A non-default camera becomes active by calling its actions from Flow (e.g. Follow Object). :::


Combining components (patterns)

GoalComponents
Damageable enemyHealth, Stats, Combat Action, Team, Health Bar
Player characterHealth, Stats, Combat Action, Team, Health Bar, Inventory
Animated platformer heroPlatformer Controller + Sprite Renderer + Sprite Animator (autoLocomotionStates on)
AI guardTop-Down/Side-Scroller Controller (controlledBy: ai) + AI Mover
Skill buttonAbility Cooldown + Object Flow on use / canUse
Battle loopTurn Queue on a controller + group-tagged fighters
Collectible coinPickup (auto-adds sensor Collider 2D)
Spikes / damage zonesHazard (auto-adds sensor Collider 2D)
Sticky arrow / boltProjectile + dynamic Rigid Body 2D (CCD on) + Collider 2D
Enemy wavesSpawner pointing at an enemy prefab
Physics propRigid Body 2D + Collider 2D
Static platform / floorCollider 2D only
Hinged door / leverJoint 2D (revolute) between two Rigid Body 2D objects
Death flopHealth + Ragdoll (activateOnDeath on)
Countdown / spawn cadenceTimer driving other actions, or Spawner's own interval
Paint-order groupSorting Group on a parent + Sprite Renderers on children

For custom types authored in the editor, see Project components & Studio. To add engine-level built-ins in code, see Authoring components in code.

Opal Engine — MIT licensed