Closed LoopAllan closed 5 years ago
Very interesting, I did not know that MonoBehaviour had a Start method that returned an IEnumerator.
As you mentioned, this is an app for a phone. I would try restructuring your Start Method. Rather than making the start method a coroutine, you could just make it return void and initialize your compass.
void Start()
{
Input.compass.enabled = true;
compass = Input.compass;
}
If I had to guess. The phone has no equivalent to the Space key from the keyboard.
I want to know how can I match direction to be same with real world direction in game.I had used Compass feature in phone unity provided.However, i found Input.Compass value did not available.I try to experiment it. First,create a project and create a script with code:
then build it to device for test,i launch app 4 times with different direction then turn to the north.Result was always different, so i really don`t know what to do... 😢