React when the view becomes obstructed
PCA 3D ADVENTURE STUDIO / ACTION LISTS & EVENTS 0.86.4.3
Use OnCameraObstructionChanged when gameplay needs to respond to the start or end of an obstruction. The camera can solve visibility on its own without a script.
| 1. | Set up a third-person shot and a blocker in Scene Designer. Start with visibility and matching fade approvals. Confirm the effect in Test Scene before attaching an event handler. |
|---|---|
| 2. | In your script’s event selector, choose OnCameraObstructionChanged. Inspect the event context and filter cameraId for the shot you care about. The event is delivered after the applicable obstruction or clear delay. |
| cameraId | ID of the active camera, for example main. |
|---|---|
| obstructed | Boolean. True on entry into obstruction, false when it clears. |
| blockerIds | Array of blocker IDs available for this update. Collision can move the view clear, so the remaining visibility blocker list can be empty. |
3. For a first test, have the filtered handler show a short debug message on each transition. Stand still behind a wall. You should see an entry, followed by a clear when the actor returns to view.
KEEP CAMERA EDITS SEPARATE FROM STORY REWARDS
If a door opening should grant an item once, keep that grant in the door’s interaction. A camera may become blocked repeatedly as the player walks.
Action Lists & Events 189
