Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.

    Read our full announcement for more information and let us know if you have any questions.

How to Check if OVR player has rotated 360 degrees from start

Discussion in 'AR/VR (XR) Discussion' started by ClaudiaKrog, Jun 23, 2020.

  1. ClaudiaKrog


    Sep 30, 2017

    I would like to check if my player has fully turned 360 degrees from her starting position when the Unity game starts. This has been tricky, since the user can start at any angle (360, 20, 0, 45, etc), and I do not know which direction she may turn. Additionally, she may turn 90 deg to the right and then 270 to the left, but this does not constitute 360 degrees in one direction.

    I have tried many different ways of doing this, but cannot think of a way that will work. If this were an object that just rotated once, I know I could check to see if it returned to the starting position. However, since this a user and I don't know how she will behave, I am not sure how to do this feasibly. I can get the rotation of the center eye in many different ways. Is there a way to just get the difference in rotation, rather than the actual rotation? For example, if user starts at 30 degrees, and goes 20 degrees in some way, how could I get this 20, rather than either the 10 of one direction, or the 50 in the other direction? If I could get just the rotation difference, I wonder if this might work, with setting the starting rotation at zero as well.

    Any ideas are appreciated! Thanks.