wrld3d / unity-api

Issue tracking for the WRLD Unity SDK
28 stars 8 forks source link

wrld sdk as helper for hololense #101

Closed mmuhasan closed 5 years ago

mmuhasan commented 5 years ago

Description

I understand the SDK currently do not support build for HoloLense. However, is there any way I still can deploy part of the scripts as helper. I need to convert some longitude and latitude position into world coordinate system. Is there any one (or few) scripts that I can extract from the sdk and manually import that into my project.

Steps to Reproduce

I am intended to use the following segment of code only.

var markerpos = Wrld.Space.LatLongAltitude.FromDegrees(37.788369f, -122.385202f, 0); var viewpoint = Wrld.Api.Instance.CameraApi.GeographicToViewportPoint(markerpos); var worldpoint = Camera.main.ViewportToWorldPoint(viewpoint ); transform.position = worldpoint;

Expected behavior: Code should work, no build error.

Actual behavior: 5 Build Errors

Reproduces how often: Every time.

Additional Information

None

jlunderwood commented 5 years ago

The code which converts LatLongAltitude positions into Unity's world space depends on the configuration of the API, in particular, the specified origin point. It's unlikely that this will match your world space if you are not using the WRLD SDK.

You may be able to find more advice on coordinate conversions on the Unity support site, for example https://answers.unity.com/questions/923182/lat-long-to-unity-world-coordinates.html may be relevant to you.