Display image only in world/back camera
Hi!
I have a question about switch camera and hide a sprite image.
Front camera - sunglasses and a face sprite
Back camera - I would like to have an image displayed only when the camera is switched to the rear/back camera. This should not be displayed on the front/selfie camera.
Is it possible?
TIA
Talitha
Hello,
This is possible by writing a script to do so.
https://lensstudio.snapchat.com/api/classes/CameraBackEvent/
https://lensstudio.snapchat.com/api/classes/CameraFrontEvent/
Let me know if you want me to make a example project for you.
Goodluck!
Hi Talitha,
Did n-mikael’s solution help with your issue? Please let us know if we can assist you further.
Best, Neha
Hey.
I tried this, but couldn't get it to work. I read about the Camera Events, but it only prints out text.
How do I get it to display an image instead?
I do simple coding, but new to JS, so a link to guidance would also be helpful.
Thanks!
Hey there,
You can use the behavior script to accomplish this! to enable/disable your image when the front and back camera events occur! You can find the behavior script in the helper scripts section.
Set the Trigger to Front or Back camera, and the response to set enabled. Then select the image you want to use!
Ben
Thank you so much Ben!
It worked!