Refactor oculus input
Improve float comparison
Fix segfault