- Home /
Gyroscope and maps
I want to know much degrees am I away from one game object . Example- When I keep rotating my mobile I want the game object say A to do the same(this can be achieved by gyro) but I am having one more game object say B which is away . I want to know how much degrees is A moving away from B .
Your question is quite unclear. which game object is moving? And when you say degree, do you mean the world direction of A away from B? or the angle between the direction and the direction of A?
As the years go by the questions get more and more abstract and confusing. I guess he talks about orientation and rotation. Though it's not clear if this is a VR problem (rotating the mobile device) or if we talk about rotating two objects in the scene.
https://docs.unity3d.com/ScriptReference/Vector2.Angle.html
Should be able to help out.
Your answer
Follow this Question
Related Questions
Gyro Sensor based on Euler angles? 0 Answers
3rd player orientation using gyro with offset 0 Answers
Assigning UV Map to model at runtime 0 Answers
Android gyro 1 Answer
Limit transform.LookAt to 90 degrees based off of object's forward axis 1 Answer