O-o… -_- it is serial port I’ve been using. For some reason in my head, they were interchangeable when writing the post. For example my connect code is this:
SerialPort serial;
serial = new SerialPort(comPort,speed,Parity.None,8,StopBits.One);
serial.DtrEnable = true;
serial.ReadTimeout = 1000;
Thread.Sleep(100); //allow time for settings to be set. Unity has issues without this.
currentLine = "trying to open";
serial.Open();
currentLine = "Opened port, entering loop";
serial.WriteLine("1");
//rest of the logic for serial reading and such here.
This is actually threaded in unity, so is pretty cool and doesn’t effect the speed of the game at all. (data is sent back to unity using delegates, so it’s also thread safe)
Getting this kind of thing (serial) working in unreal is what I would need. Eventually this will probably be a bluetooth device instead of usb, to make it wireless. -_- it’s actually quite the pain to use with all the wires from prototyping it. I don’t think sockets would actually work due to latency, (through the network) nor do I even know if bluetooth would be fast enough. It’s still in early development stages, so trying to find the fastest thing is key.
It’d honestly probably be better to use pipes to a dll or something (driver?) so that the game wouldn’t require any updates, just the driver to get better accuracy and such (like better drift compensation). I’ve gotten pipes working with unity, and the program would send over 7,000 instructions through the threaded pipe per second in a basic scene, so latency would be fine. O-o Any ideas on this? (Perhaps I should have placed this post in the vr subforum)