Skip to reading
PCA Script Programming

set_interaction_approach_enabled()

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

Enable / Disable Automatic Interaction Approach | Action ID: SetInteractionApproachEnabled

Set the global runtime approach-to-target behavior, including distance and whether to face the target.

Source table from set_interaction_approach_enabled(), page 147
Option key / fieldMeaning and accepted inputDefault
Automatic Approach Enabled enabledExplicit on/off state for the feature or response.true
Default Stop Distance distanceNumber; decimals allowed. Range: 0.0 to 20.0.0.35
Face Target After Approaching faceTargetOn/off.true

Timing. The call waits for its runtime routine to return; no additional completion wait is promised by this schema.

Code example
set_interaction_approach_enabled({"enabled": true, "distance": 0.35, "faceTarget": true})

In use. Enable walking up to interactive props, then choose a modest stop distance. If the player stops too far away, inspect both approach settings and the physical collider. The event volume is a separate object.

Page 147 of 357Permalink
Go to page