Last active
April 12, 2023 21:10
-
-
Save positlabs/5fea51a4d61713353ffb368aa3cf18ea to your computer and use it in GitHub Desktop.
Lens studio script to enable an object only on the front camera
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//@input SceneObject obj | |
/** @type {SceneObject} */ | |
var obj = script.obj | |
script.createEvent('CameraFrontEvent').bind(function(){ | |
if(obj) obj.enabled = true | |
}) | |
script.createEvent('CameraBackEvent').bind(function(){ | |
if(obj) obj.enabled = false | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment