MCJack123 / craftos2

A fast, modern, and feature-filled ComputerCraft emulator written in C++.
https://www.craftos-pc.cc
Other
217 stars 25 forks source link

Device sensor support #315

Open EmmaKnijn opened 1 year ago

EmmaKnijn commented 1 year ago

Is your feature request related to a problem? Please describe. I'd really like to grab sensor data (like gyroscope or compass), specifically for mobile devices. You'd be able to make a wiimote for cc running ingame or even vr.

Describe the solution you'd like I'd like to be able to run a lua command (like mobile.sensor([sensor_type])) and have it return data, and also have a mobile.sensorAsync([sensor_type],[rate]) method to make it spit out events at the specified rate or a default rate when no rate is supplied.

Some sensors that'd seem neat for CC:

I don't think biometric sensors would work well with CC

Describe alternatives you've considered I don't think there's any other great way to implement this