Change camera safety from an action
On this page
PCA 3D ADVENTURE STUDIO / ACTIONS & RUNTIME PROPERTIES 0.86.4.3
The Camera safety workshop has a camera named main and objects named wall0 and wall1 in room_01. Use a GUI button or action list in a copy of that room to try these registered actions.
Keep the angle and fade approved walls#
{"type":"ChangeCameraProperty","cameraId":"main",
"property":"cameraSafety.mode","value":"visibility"}
{"type":"ChangeCameraProperty","cameraId":"main",
"property":"cameraSafety.policy","value":"fade"}Create two separate action items in that order. The camera also accepts cameraSafety.radius and cameraSafety.opacity. Use a positive radius and an opacity from 0 to 1. occlusionState is a read-only camera property for inspecting the running shot.
Let one wall stay solid after a puzzle#
{"type":"ChangeObjectProperty","sceneId":"room_01",
"entityId":"wall0","property":"visibilityTreatment",
"value":"never","persistence":"persistent"}Give a second button this action. Begin with both walls approved for fade. Trigger the button while the actor is behind them. Only wall0 loses fade eligibility. A persistent write preserves this authored rule across a save and reload.
CHECK THE CORRECT OWNER
cameraBlocker and visibilityTreatment belong to a room object. cameraSafety.mode and cameraSafety.policy belong to a camera. A material’s current fade level is computed from the view. Use camera safety in the live debug console to see which walls are involved.
Actions & Runtime Properties 38
