This function assigns a camera to a specific viewport in a room other than the current one.
You supply the room index, the view index (from 0 to 7) and then the index of the camera to use.
room_set_camera(rm, vind, camera);
Argument | Type | Description |
---|---|---|
rm | Room Asset | The room to set the view camera of |
vind | Real | The index of the view port to assign the camera to |
camera | Camera ID | The index of the camera to assign |
N/A
global.myroom = room_add();
room_set_camera(global.myroom, 0, global.MainCam);
The above code assigns a camera in a newly created room to view port [0].