How do you get the phone to rotate and how do you control the UV texture movement?

how do you get the phone to rotate and how do you control the UV texture movement?
In Spark it is the device rotation and 2d texture transform patch, but in snapchat I did not find anything similar in the documentation.

To use “device motion” in LS, you need to attach a Device Tracking component to your camera. That will anchor the camera in world space and your other scene elements (outside of the camera) will render in the physical space.

If you want to use the camera rotation value to offset some texture UVs, you will need some script. Here I’m using the unlit graph material, which has a property called uv2Offset.

//@input Component.Camera camera
/** @type {Camera} */
var camera = script.camera

//@input Asset.Material material
/** @type {Material} */
var material = script.material

script.createEvent('UpdateEvent').bind(function(){
    var quat = camera.getSceneObject().getTransform().getWorldRotation()
    material.mainPass.uv2Offset = new vec2(quat.toEulerAngles().y / Math.PI * 4, 0)
})

Project files: