calculating rotation to y on the server