Skip to main content

LensStudio:HierarchyUtils.js.createPerspectiveCameraOnObject

Function

Creates a perspective camera on the specified scene object.

createPerspectiveCameraOnObject(scene, sceneObject, renderLayer?): SceneObject

Creates a perspective camera on the specified scene object.

Parameters

ParameterTypeDescription
sceneSceneThe scene in which the camera will be created.
sceneObjectSceneObjectThe scene object on which the camera will be added.
renderLayer?LayerId-

Returns

SceneObject

The modified scene object with the added camera component.