Make input handling tick rate independent