Making the image go Upside down ?
-
Hi James,
In general, I recommend taking a look at the Fullscreen Template if you're looking for ways to affect the video feed based on user touch events.
To create the specific experience you're describing in an empty project, you can try the following:
- Create a Billboard in the Objects panel by selecting Add New > Billboard.
- Select the newly created billboard object and set its Sprite Component's "Texture" property to the Device Camera Texture.
- Create a new Script in the Resources panel by selecting Add New > Script
- Double-click the Script you created in Resources to open it in a text editor.
- Add the following script to the script file:
script.getTransform().setWorldRotation(quat.quatFromEuler(0, 0, Math.PI));
- Save and close the script. Return to Lens Studio.
- Select the billboard object again. In the Inspector, add a Script Component to the billboard object. Add the Script you created earlier. Set its event in the dropdown to "Touch Start" or "Tapped".
- Now when you tap on the Preview panel, you should see the video feed flip upside down.
Let me know if this works for you, or if you have any further questions.
Best,
Peter
Comment actions
Please sign in to leave a comment.
Have a comment?