- Home /
External gyroscope question
So I have an external IMU (gyroscope) (not on phone or PC) and I want to use the data gathered from that IMU in my Unity game. How would I enable Unity to accept this data?
I have a windows PC. Currently I am using a TCP connection between my IMU and PC through mobaXterm terminal and I am able to receive the IMU data.
Would using my external IMU data be possible? If it is, how involved is the process/can someone give advice on how it could be done?
Answer by FortisVenaliter · Dec 14, 2017 at 06:35 PM
I'm pretty sure you can access C# .NET Socket classes, but only for Windows development. So, as long as you're doing it on Windows, you should be able to hook it up to the sensor the same way you'd hook up any other C# program. Beyond that, though, would not be a Unity question, and would probably be better asked elsewhere.
The .NET socket classes work on most build platforms. The only true exception is WebGL and maybe some exotic console targets. However the "main" targets which are Standalone (Win, $$anonymous$$ac, Linux Ubuntu 12.04+) and $$anonymous$$obile (iOS, Android) should work just fine. Even WindowsPhone has socket support, however it uses a slightly different API.
Unity uses it's own $$anonymous$$ono environment which is shipped with your build. It doesn't rely on .NET / $$anonymous$$ono being installed on the target platform. An exception is the WindowsPhone and "Windows Store Apps" afaik as they use the actual .NET environment that's preinstalled on those platforms.