Skip to main content

🎯Conditions

Conditions allow you to check the state of your 3D scene or respond to events. Use these in Construct 3 Event Sheets to create interactive 3D experiences.

World

📋

On Rapier Physics Initialized

physics

Triggers when Rapier Physics engine is successfully initialized and ready to use.

Triggers when:

Physics engine completes initialization

Example Usage:

// On Rapier Physics Initialized -> Log "Physics engine ready!"
Event Trigger
📋

On Rapier Physics Load Fails

physics

Triggers when there is an error during Rapier Physics initialization.

Triggers when:

Physics engine fails to load or initialize

Example Usage:

// On Rapier Physics Load Fails -> Log "Failed to load physics engine"
Event Trigger
📋

Is Rapier Ready

physics
📋

Returns true when Rapier Physics is successfully initialized and operational.

Triggers when:

Check if physics engine is ready for use

Example Usage:

// Is Rapier Ready -> Enable physics controls
Condition

Collisions & Triggers

💥

On Collision Enter

collision

Triggers when a physics object starts colliding with the specified object.

Triggers when:

Physical collision begins between objects

Parameters

objectId
ID of the object to monitor for collisions

Example Usage:

// On Collision Enter for Id "player" -> Log "Player hit something!"
Event Trigger
💥

On Collision Exit

collision

Triggers when a physics object stops colliding with the specified object.

Triggers when:

Physical collision ends between objects

Parameters

objectId
ID of the object to monitor for collision exits

Example Usage:

// On Collision Exit for Id "player" -> Log "Player separated from object"
Event Trigger
💥

On Trigger Enter

collision

Triggers when another object enters the specified object's trigger zone (non-physical collision).

Triggers when:

Object enters trigger zone

Parameters

objectId
ID of the object acting as a trigger zone

Example Usage:

// On Trigger Enter for Id "checkpoint" -> Log "Checkpoint reached!"
Event Trigger
💥

On Trigger Exit

collision

Triggers when another object exits the specified object's trigger zone (non-physical collision).

Triggers when:

Object leaves trigger zone

Parameters

objectId
ID of the object acting as a trigger zone

Example Usage:

// On Trigger Exit for Id "safe_zone" -> Log "Left safe area"
Event Trigger

Raycast

📋

On Raycast Hit

raycast

Triggers when a raycast operation successfully hits an object in the scene.

Triggers when:

Raycast intersects with an object

Example Usage:

// On Raycast Hit -> Log "Raycast found target at: " & HitPoint
Event Trigger
📋

Foreach Raycast Hit

raycast
🔁

Loops through each object hit by a raycast operation, useful for handling multiple intersections.

Triggers when:

Iterate through all raycast intersection results

Example Usage:

// Foreach Raycast Hit -> Log "Hit object: " & CurrentHitObject.ID
Loop / Iteration

Objects (Rigidbody)

📦

On Rapier Object Created

object

Triggers when a specific physics object is successfully created and added to the scene.

Triggers when:

Specified physics object is spawned

Parameters

objectId
ID of the specific object to monitor for creation

Example Usage:

// On Rapier Object Created with ID "enemy1" -> Log "Enemy spawned!"
Event Trigger
📦

On Any Rapier Object Created

object

Triggers when any physics object is created and added to the scene.

Triggers when:

Any physics object is spawned

Example Usage:

// On Any Rapier Object Created -> Log "New physics object added: " & LastCreatedObject.ID
Event Trigger
📦

Is Rapier Object Loaded

object
📋

Returns true if the specified physics object is currently loaded and active in the scene.

Triggers when:

Check if object exists in scene

Parameters

objectId
ID of the object to check for existence

Example Usage:

// Is Rapier Object "powerup1" Loaded -> Show interaction prompt
State Check
📦

Foreach Rapier Object

object
🔁

Loops through each physics object in the scene that has the specified tag.

Triggers when:

Iterate through objects with matching tag

Parameters

tag
Tag name to filter objects for iteration

Example Usage:

// Foreach Rapier Object with tag "enemy" -> Apply damage to CurrentObject
Loop / Iteration

Usage Tips

Event Triggers vs State Checks

  • ⚡ Event Triggers - Run once when something happens (On Object Created, On Model Loaded)
  • 🔍 State Checks - Continuously check conditions (Is Visible, Camera Is Moving)

Performance Considerations

  • Use state-checking conditions sparingly in Every Tick events
  • Prefer event triggers for better performance when possible
  • Cache condition results when checking the same thing multiple times

Parameter Types

  • objectId - String identifier for specific objects
  • comparison - Operators like >, <, =, >=, <=
  • margin - Float value for tolerance/buffer zones (0.0 to 1.0)