Skip to content

Instantly share code, notes, and snippets.

@positlabs
Last active April 12, 2023 21:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save positlabs/5fea51a4d61713353ffb368aa3cf18ea to your computer and use it in GitHub Desktop.
Save positlabs/5fea51a4d61713353ffb368aa3cf18ea to your computer and use it in GitHub Desktop.
Lens studio script to enable an object only on the front camera
//@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