Class LocationConverter
GPS数据与Unity变换的转换器。只能在坐标系与Mega Block对齐时使用。
public static class LocationConverter
- 继承
-
LocationConverter
方法
LocationToPosition(Transform, Location?, Transform, Location?)
通过GPS数值及已知点调整当前点位移。
public static void LocationToPosition(Transform t, Location? l, Transform tother, Location? lother)
参数
tltotherlother
Position(Location, Location)
求相对位移。
public static Vector3 Position(this Location l, Location lother)
参数
llother
PositionToLocation(Transform, Transform, Location?)
根据已知点获取当前点GPS。
public static Location? PositionToLocation(Transform t, Transform tother, Location? lother)
参数
ttotherlother
Translate(Location, Vector3, Vector3)
根据已知点的GPS求当前点的GPS。
public static Location Translate(this Location l, Vector3 from, Vector3 to)
参数
lfromto