qian256 / HoloLensARToolKit

Marker tracking using the front-facing camera of HoloLens (both 1 and 2) and Unity, with a wrapper of ARToolKit built for UWP (Windows Universal Platform)
GNU Lesser General Public License v3.0
349 stars 92 forks source link

Scaling between Unity and Hololens display #28

Closed araujokth closed 5 years ago

araujokth commented 6 years ago

Hi, was wondering what is the scaling applied to convert between the object defined in Unity and displayed in the Hololens? For example, if the marker cube is changed to another size, how can I change it in Unity so that it becomes with the correct dimensions when displayed in the Hololens?

qian256 commented 6 years ago

Ideally the scale between real objects and Unity virtual objects should be 1. But it is not often the case. If you just want to scale down the virtual object, you should have a dummy object under the scene_root object and acts as parent for the virtual object, because the ARUWPMarker script will update the transform of the scene_root object at runtime.