scene_set_camera
Sets play camera distance, field of view, a locked fixed view, and player turn limits in a copy of the save, so side-view and top-down games keep a stable angle.
Instructions
Change how far the play camera stands from the character, its field of view, and whether the player can turn it, in a copy of a save. fixedView {yaw, pitch, ignoreCollision} locks the view (the 2.5D camera of the editor, 2.5D镜头): the camera looks from one horizontal angle (yaw 0 looks towards +z from the -z side, so that A and D walk along x; 90 turns it a quarter round) at one pitch (positive looks down: 20 to 25 for a side view, 50 to 60 for a view from above), the player cannot turn it with the mouse, the zoom is held at the distance, and with ignoreCollision (on unless switched off) the camera does not jump close when a wall or an invisible wall comes between it and the character. Every game that is built for one direction of view (a side-scroller, an arena seen from above, a lane) needs this: without it the first movement of the mouse turns the camera and D no longer walks along the lane. Read from a template switched to that mode by hand in the editor on 2026-10-13 and written the same way; seen in play that day (examples/hazards/hazards_fixed_view.json: the same mouse movements that swing the free camera right round leave the fixed view where it is; hazards_free_view.json is the comparison). Without fixedView: The picture shows about 2distancetan(fieldOfView/2) metres of height at the character and 16/9 of that across (at 45 degrees: 14 m shows about 20.6 m across, 18 m about 26.5 m; in a side-view game whatever stands further from the character than half of that is off the screen): 6 m at 45 degrees is a close shot (5 m tall, large buildings are cut off), 14 m shows about 11.6 m and whole buildings with sky above them. yawRange and pitchRange ([min, max] in degrees) limit how far the player can turn the camera; a new template allows everything (-180..180, -89..89). The camera starts behind the character, wherever the character faces: set the facing with scene_set_spawn (rotation [0,0,0] faces +z, so the camera looks from the -z side and A and D walk along x; turned 90 degrees, D no longer walks along x). yawRange did not fix the starting direction in playtests, and a yawRange of [0, 0] is dropped when the editor saves; pitchRange [55, 55] does give a top-down view. The camera template must already exist (create it once in the editor). Writes a new .gil in the workspace and returns its path; the official save is not touched.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| mapPath | No | ||
| distance | No | ||
| yawRange | No | ||
| fixedView | No | ||
| outputName | No | ||
| pitchRange | No | ||
| fieldOfView | No |