I’m currently working on a project where I need to implement device orientation-based camera control (gyroscope-based camera control) for a mobile experience.
I want the camera to rotate based on the mobile device’s rotation, but I’m facing some issues with the implementation. The camera rotation feels off and doesn’t align correctly with the character’s forward direction.
Please Help or share similar project
Thanks in Advance
I don’t know how are u doing this, but to be honest what would i do ?
I would use the navigator existing api:
Using this api, i actually think u are already using it to handle the orientation. So, with that in hands instead of movimenting the camera with this data. U’ll pass it to an existing cc event, or create your own and receive this data. To pass event in playcanvas is something like this.app.on or this.entity.on.
To be easy to test, use existing CC. And later in proj create your own if needed.