Topic: NGUI Rotate the camera on a compass
Hello
using UnityEngine;
namespace InfinityCode.OnlineMapsExamples
{
[AddComponentMenu("Infinity Code/Online Maps/Examples (API Usage)/RoteteCameraByGPSExample")]
public class RoteteCameraByGPSExample : MonoBehaviour
{
private void Start()
{
OnlineMapsLocationService.instance.OnCompassChanged += OnCompassChanged;
}
private void OnCompassChanged(float f)
{
OnlineMapsTileSetControl.instance.cameraRotation.y = f * 360;
}
}
}
NGUI Only Texture. The above source does not operate.
private void OnCompassChanged(float f)
{
this.transform.rotation = Quaternion.Euler(0,0,angle); //(UITexture GameObject)
}
The above source, rotate well. But there is a problem with touch and drag the marker.
Please NGUI Rotate the camera on a compass.
I'm sorry that I can not speak English.
Thank you.