How to implement Mobile accelerometer/gyroscope controls in PlayCanvas?

Hi All, I have to implement Mobile accelerometer/gyroscope controls in my game.

Can anyone please share some references for how I can implement the mobile accelerometer/gyroscope controls?

Thanks in advance.

Hi @Akhil-Bhaskar,

Check the following two MDN articles on how to access those values on available devices:

From there you can use those values to either rotate your player entity, apply impulses etc.

1 Like