This package provides a Unity script, SK_DeviceSensor, designed to facilitate the integration of gyroscope and accelerometer data into Unity projects, specifically tailored for WebGL builds. The package includes functionality to start and stop listeners for both gyroscope and accelerometer events. Key features include:
- Gyroscope Integration: Start and stop listeners for gyroscope data, with conversion methods to translate gyroscope readings into Quaternion rotations.
- Accelerometer Integration: Start and stop listeners for accelerometer data, with conversion methods to process accelerometer readings and rotations.
- Ease of Use: Simple static methods for starting and stopping listeners, with clear instructions for use.
The package includes UnityEvent and data classes for handling gyroscope and accelerometer data, as well as initialization, start and stop listener methods, and platform checks. The script also includes callback methods for handling incoming sensor readings and converting data into Quaternion rotations.
To use this package, attach the script to a GameObject in your Unity scene, start listening to gyroscope and accelerometer data using the provided methods, and implement callback methods to handle the data as needed. Be aware of platform limitations and test the integration in a WebGL build to ensure compatibility and proper functioning of gyroscope and accelerometer features.
The package uses UnityEvent and data classes to handle gyroscope and accelerometer data, with methods for initialization, starting and stopping listeners, and platform checks. The script also includes callback methods for handling incoming sensor readings and converting data into Quaternion rotations. The package is designed to work with most modern mobile web browsers and can be tested using Chrome development tools.
Gyroscope and Accelerometer Integration for WebGL - Asset Store





