set_viewport_camera
Place the active level editor viewport camera at an absolute world location or rotation; invalid input is refused before the camera moves.
Instructions
Place the camera of the active level editor viewport (the focused one, else the first) at an absolute world location and/or rotation; at least one is required and no viewport is an error. Editor view only, not undoable or saved: a PIE player camera (set_view_target) or a camera actor (set_camera_transform) does not move. location must be an [x, y, z] array of three numbers in cm and rotation three numbers or a roll/pitch/yaw object; anything else is refused before the camera moves. The reply reads location and rotation back, rotation as [pitch, yaw, roll]. Frame an actor with focus_viewport.
Returns: { applied: bool, location_set: bool, rotation_set: bool, location: [number], rotation: [number] }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| location | No | Optional [x, y, z] world location | |
| rotation | No | PREFERRED: the OBJECT {"roll":R,"pitch":P,"yaw":Y} (any subset, absent axes are 0). The ARRAY form below is [pitch, yaw, roll] -- its index 2 is ROLL, NOT yaw, which once put a PlayerStart on its side. Optional [pitch, yaw, roll] world rotation |