c# – How do I mirror real-life movement in Unity?
I’m building a simple project where the movement of a user in real life around a room should control a virtual player object. Any change in position should be reflected accordingly, both translation and lateral rotation (but not forward/backward tilt). I want this to be as close to real-time as possible.
The project will be a WebGL build hosted on GH pages (users access it via phones). How do I implement the movement logic in the simplest yet most effective way?
I tried to use the accelerometer and gyroscope input values, but I got some funky results where tilt was the only way I could move the character (not what I want at all). Additionally, this method doesn’t understand movement if the player isn’t facing in the direction of movement.
Read more here: Source link