PatHightree / SpaceNavigator

SpaceNavigator driver for Unity3D
MIT License
171 stars 53 forks source link

Camera or object drifts #4

Closed jimfleming closed 8 years ago

jimfleming commented 8 years ago

It looks like GetTranslation of SpaceNavigatorMac drifts without touching the SpaceMouse. I've fixed it like this:

int x = 0, y = 0, z = 0;
SampleTranslation(ref x, ref y, ref z);
x = Math.Abs(x) > 1 ? x : 0;
y = Math.Abs(y) > 1 ? y : 0;
z = Math.Abs(z) > 1 ? z : 0;

It's hacky but quick and seems to work.

PatHightree commented 8 years ago

Indeed, a number of people have reported this issue on mac. I'm a PC user, so this bug slipped by me... oops Another user (Enrico Tuttobene) submitted a fix like yours a while back. I've included it into the code and submitted it to the asset store, it is now pending review. Thank you for your effort!

jimfleming commented 8 years ago

Thanks!