Custom motion capturing framework for real-time user interaction