Access to main sensors on Android (DEF-1683 and DEF-1684)

Basically, being able to retrieve info from camera, gyroscope, mic and control over rumble and mic for recording.
Can’t find any ref if already available :confused: Would love to experiment with them.
Btw, great job with the engine, lovin’ it. Cheers from France.

The gyro is available in on_input as action.acc_x, action.acc_y and acction.acc_z - the other ones are (to my knowledge) not supported.

Yes, gyro/accelerometer values come in the on_input function as acc_x, acc_y and acc_z just as Johan describes.

We currently don’t have support for camera and microphone. I’ve added camera and microphone support tickets as DEF-1683 and DEF-1684

1 Like

Yep, I already noticed and tried it, works well. That’s why I’m really eager to test others out ^^
Perfect ! :smile: Cheers

I can see accelerometer is supported - but what about gyroscope? Can’t find that as part of the input message.

Exactly, gyro is not supported. It might end up as a feature in the engine, or as a native extension as soon as we have Java support for our extension system. I have already played around with gyroscope on iOS as a native extension and I’ll make sure to extract this into a separate library project along with Android support as soon as it is possible.

3 Likes

I downloaded and added the gyro extension to my project. However, it fails to build (extension/extension.h not found) using the old editor, but appears to build using the new editor (haven’t tried running it on an iOS device though) - is that expected?

Ah, the extension uses old SDK APIs. Sorry about that. I’ll extract it to a separate repo and update it during the day.

I’ve extracted the gyroscope extension to it’s own GitHub project and updated it to support the latest version of native extensions. I also added an example that uses the Defold camera extension to create a Pokemon GO kind of augmented reality experience.

5 Likes