Skip to content

Commit d7314cf

Browse files
C-CorpzeIgnisRBX
andauthored
Added engine detail to Camera.yaml (#1053)
A detail about camera behavior such as cameras getting parented to `nil` when `Workspace.CurrentCamera` is set to another camera. Current Roblox documentation lacks information about what happens when multiple camera objects are present in Workspace and the CurrentCamera property is changed to a different camera. Cameras randomly being parented to `nil` might seem confusing and like some kind of bug if you can't even find anything about it in the documentation. --------- Co-authored-by: IgnisRBX <[email protected]>
1 parent 9d6e375 commit d7314cf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

content/en-us/reference/engine/classes/Camera.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ description: |
3131
3232
See [Customizing the Camera](../../../workspace/camera.md) for more
3333
information on how to adjust and customize the camera's behavior.
34+
35+
36+
#### Storing Multiple Cameras
37+
38+
Note that when changing `Class.Workspace.CurrentCamera` to a new `Class.Camera`,
39+
all other `Class.Camera|Cameras` directly descending from `Class.Workspace` will be
40+
destroyed. If you need to store multiple cameras and swap between them on demand,
41+
it's recommended that you store them in a `Class.Folder` or `Class.Model` under
42+
`Class.Workspace`, inside which they will remain even when
43+
`Class.Workspace.CurrentCamera|CurrentCamera` is changed.
3444
code_samples:
3545
inherits:
3646
- PVInstance

0 commit comments

Comments
 (0)