Gyroscope data

hi, is there a way to access to x,y,z device orientation? I´m looking at the documentation but all I can find is mouse input related data, can anybody tell me how to get gyroscope data please?

Original Post on Discord

by user 528663425488781362

Have a look at Gyroscope - Web APIs | MDN
Theres some example code

thank you, I appreciate it

by user 528663425488781362

Actually @herbst​:cactus: built a sample for you :smile: Device Sensors | Needle Engine

You can find the code for it in this repo GitHub - needle-tools/needle-engine-samples: Live: https://engine.needle.tools/samples 🌵 Needle Engine sample scenes - use as examples and as a reference for learning 😊

that´s exactly what I´m looking for!! thank you so much

by user 528663425488781362

:slightly_smiling_face: let me know how it goes! There’s code for Android + iOS already in there (needs separate code paths)