Added in a logic for moving sphere based on orientation