🎯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
physicsTriggers 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!"
On Rapier Physics Load Fails
physicsTriggers 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"
Is Rapier Ready
physicsReturns 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
Collisions & Triggers
On Collision Enter
collisionTriggers when a physics object starts colliding with the specified object.
Triggers when:
Physical collision begins between objects
Parameters
Example Usage:
// On Collision Enter for Id "player" -> Log "Player hit something!"
On Collision Exit
collisionTriggers when a physics object stops colliding with the specified object.
Triggers when:
Physical collision ends between objects
Parameters
Example Usage:
// On Collision Exit for Id "player" -> Log "Player separated from object"
On Trigger Enter
collisionTriggers when another object enters the specified object's trigger zone (non-physical collision).
Triggers when:
Object enters trigger zone
Parameters
Example Usage:
// On Trigger Enter for Id "checkpoint" -> Log "Checkpoint reached!"
On Trigger Exit
collisionTriggers when another object exits the specified object's trigger zone (non-physical collision).
Triggers when:
Object leaves trigger zone
Parameters
Example Usage:
// On Trigger Exit for Id "safe_zone" -> Log "Left safe area"
Raycast
On Raycast Hit
raycastTriggers 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
Foreach Raycast Hit
raycastLoops 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
Objects (Rigidbody)
On Rapier Object Created
objectTriggers when a specific physics object is successfully created and added to the scene.
Triggers when:
Specified physics object is spawned
Parameters
Example Usage:
// On Rapier Object Created with ID "enemy1" -> Log "Enemy spawned!"
On Any Rapier Object Created
objectTriggers 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
Is Rapier Object Loaded
objectReturns true if the specified physics object is currently loaded and active in the scene.
Triggers when:
Check if object exists in scene
Parameters
Example Usage:
// Is Rapier Object "powerup1" Loaded -> Show interaction prompt
Foreach Rapier Object
objectLoops through each physics object in the scene that has the specified tag.
Triggers when:
Iterate through objects with matching tag
Parameters
Example Usage:
// Foreach Rapier Object with tag "enemy" -> Apply damage to CurrentObject
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)