Hot answers tagged motion-control
I've found a workable approach. I grabbed the DS4Tool source and copied the bits I needed into my Unity project so I could read the reports from the device directly. (That's the NativeMethods class to interface with Kernel32.dll, the device enumeration from HidDevices, and reading the report from the HidDevice class. I cut out the rest to keep things as ...
Those appear to all be tools that wrap DirectInput to XInput. Unity has support for DirectInput and so you should be looking at getting it work without 3rd party tools. The key is if the IMU is mapped to anything in DirectInput and if it is already in a usable state. If not, you might have to write your own DirectInput handler to deal with the raw data. ...
Remember that acceleration is a change in velocity. You will want to use the acceleration samples to accumulate in the velocity variable. IE, instead of velocity = acceleration * time try velocity = velocity + acceleration * time
I once created a system like this as an experiment. The way I did it was to abstract the pixel-perfect path of the mouse away into a series of quantized directions of travel (rounded to 45° for my purposes). My primitive matching algorithm just tried to fit a pattern to the series when the user released the mouse button. If I were to do it again I would ...
Only top voted, non community-wiki answers of a minimum length are eligible