Skip to main content

1. Overview

Triggers are the detection mechanisms that power interactive experiences in VRse Studio. They act as the “sensors” of your VR world, continuously monitoring for specific user actions and environmental changes. When conditions are met, triggers fire events that can advance your story, execute actions, or respond to user behavior. This comprehensive reference covers all available triggers and their implementation based on the current VRse Studio codebase.

2. Understanding Triggers

2.1 What Are Triggers?

Triggers are event detection systems that monitor specific conditions within your VR experience. Each trigger watches for discrete events such as:
  • Object Interactions: Grabbing, touching, or manipulating objects
  • Spatial Relationships: Object placement, collisions, or proximity
  • User Behavior: Eye tracking, movement patterns, or responses
  • Time-Based Events: Countdown completions or duration thresholds
  • System Events: UI interactions, evaluations, or custom conditions
Think of triggers as the “if” statements in your VR experience - they define when specific story moments should progress or when feedback should be provided to users.

2.2 Trigger Structure

Every trigger follows a consistent JSON structure:
{
  "Name": "TriggerName",
  "Query": "TargetObjectName", 
  "Option": "SpecificDetection",
  "Data": "{\"parameter\":\"value\"}",
  "Type": 1
}
Components:
  • Name: The trigger type identifier
  • Query: Target object name being monitored
  • Option: Specific detection behavior within the trigger type
  • Data: JSON string containing configuration parameters
  • Type: Legacy field (currently unused, reserved for future functionality)
Note: The Type field is currently not used in the system and has no functionality. It is maintained for backward compatibility and may be utilized for future features. Always set this to 1 for triggers.

2.3 Common Parameters

Most triggers support these universal parameters:
  • handOption: Specify hand detection (“None”, “Left”, “Right”, “Both”)
  • waitForCompletion: Control trigger completion behavior
  • targetObjectName: Reference to monitored object
  • duration: Time-based thresholds for detection
  • isTrigger: Physics detection mode (trigger vs collision)

3. Trigger Categories

Triggers are organized into several categories based on their detection focus:
CategoryPurposeExamples
Object InteractionMonitor object manipulationGrab, touch, placement
Spatial DetectionTrack spatial relationshipsCollisions, eye level, proximity
Time-BasedRespond to temporal eventsCountdown completion, duration
UniversalCatch-all interaction detectionAny trigger, custom conditions
EvaluationAssessment and feedbackMCQ responses, completion tracking

4. Object Interaction Triggers

4.1 GrabbableTrigger

Detects when objects are grabbed, released, or used (squeezed) with hand-specific detection capabilities. Options
OptionDescription
GrabObject is grabbed by user
ReleaseObject is released from grip
UsedObject is squeezed/activated while held
Parameters
ParameterTypeDescription
handOptionStringHand specification: “None”, “Left”, “Right”, “Both”
Example Usage
{
  "Name": "GrabbableTrigger",
  "Query": "TrainingCube",
  "Option": "Grab",
  "Data": "{\"handOption\":\"Right\"}",
  "Type": 1
}

4.2 HandTouchTrigger

Detects hand contact with objects or surfaces for precise touch interactions. Options
OptionDescription
TouchHand makes contact with object
UntouchHand breaks contact with object
Example Usage
{
  "Name": "HandTouchTrigger",
  "Query": "TouchButton",
  "Option": "Touch",
  "Data": "",
  "Type": 1
}

4.3 PlacePointTrigger

Monitors object placement at specific locations with support for correct/incorrect placement detection. Options
OptionDescription
PlaceAny object placed at location
RemoveAny object removed from location
PlaceCorrectCorrect object placed
PlaceWrongIncorrect object placed
RemoveCorrectCorrect object removed
RemoveWrongIncorrect object removed
Parameters
ParameterTypeDescription
grabbableNameStringTarget object name (for Place/Remove)
disableGrabOnPlaceBooleanPrevent grabbing after placement
createGhostMeshBooleanShow placement preview
deleteGhostMeshOnPlaceBooleanRemove preview after placement
Example Usage
{
  "Name": "PlacePointTrigger",
  "Query": "AssemblyPoint",
  "Option": "PlaceCorrect",
  "Data": "{\"createGhostMesh\":true,\"deleteGhostMeshOnPlace\":true}",
  "Type": 1
}

5. Spatial Detection Triggers

5.1 CollisionTrigger

Detects physical interactions between objects with support for both trigger and collision detection. Options
OptionDescription
EnterObjects begin contact
StayObjects remain in contact
ExitObjects separate
Parameters
ParameterTypeDescription
targetCollisionGameObjectStringObject to detect collision with
isTriggerBooleanUse trigger (true) or solid collision (false)
Example Usage
{
  "Name": "CollisionTrigger",
  "Query": "MovingPlatform",
  "Option": "Enter",
  "Data": "{\"targetCollisionGameObject\":\"SafetyBarrier\",\"isTrigger\":false}",
  "Type": 1
}

5.2 EyeLevelDetectionTrigger

Tracks when objects enter, stay within, or exit the user’s eye level for attention-based interactions. Options
OptionDescription
EnteredEyeLevelObject enters user’s eye level
StayedEyeLevelObject remains in eye level for duration
ExitedEyeLevelObject exits user’s eye level
Parameters
ParameterTypeDescription
targetObjectNameStringObject to track
stayDurationFloatRequired duration for stayed detection
Example Usage
{
  "Name": "EyeLevelDetectionTrigger",
  "Query": "PlayerCamera",
  "Option": "StayedEyeLevel",
  "Data": "{\"targetObjectName\":\"CriticalEquipment\",\"stayDuration\":3.0}",
  "Type": 1
}

6. Time-Based Triggers

6.1 TimerTrigger

Responds to countdown timer completion for time-sensitive training scenarios. Parameters
ParameterTypeDescription
endTimeFloatTimer duration in seconds
Example Usage
{
  "Name": "TimerTrigger",
  "Query": "SafetyTimer",
  "Option": "",
  "Data": "{\"endTime\":60.0}",
  "Type": 1
}

7. Universal Triggers

7.1 AnyTrigger

Universal interaction detector that captures any user action with advanced filtering capabilities. Parameters
ignoreQueriesString ArrayObject names to ignore
ignoreTriggerTypesString ArrayTrigger types to ignore
triggerFromIntegerTrigger after N interactions (default: 1)
triggerIntervalIntegerTrigger every N interactions (default: 0)
triggerOnceBooleanOnly trigger once (default: false)
ignoreOnRightTriggersBooleanIgnore correct interaction objects
Example Usage
{
  "Name": "AnyTrigger",
  "Query": "",
  "Option": "",
  "Data": "{\"triggerFrom\":2,\"triggerOnce\":true,\"ignoreOnRightTriggers\":true}",
  "Type": 1
}

8. Evaluation Triggers

8.1 MCQResponseTrigger

Detects responses to multiple-choice questions with support for correctness evaluation. Options
OptionDescription
AnyResponseAny answer provided
CorrectResponseCorrect answer given
WrongResponseIncorrect answer given
Example Usage
{
  "Name": "MCQResponseTrigger",
  "Query": "EvaluationPanel",
  "Option": "CorrectResponse",
  "Data": "",
  "Type": 1
}