HoloLens 2 zoom in and out feature WebXR’s of hologram

Hi,
Actually, I want to zoom in and out feature in WebXR’s. Does anybody have an idea in Babylon?

ping @RaananW

Zoom in and out? You mean making meshes bigger and smaller? We have gizmos for that :slight_smile:

I’ll need a bit more context to understand what you are trying to achieve. Having said that - there is true zoom in and out scenarios (like a mousewheel in arc rotate) in XR. XR works in real world units. If you want to scale your world, add every loaded mesh to a transform node and set its scale when a user input was triggered (your call which one).

Hi RaananW,
Actually when I am using a hologram in HoloLense then it’s too large and I want to control it through a finger that I can bigger and smaller holograms in a real environment.

This is a custom implementation you will need to develop yourself.

If you want to use one of our gizmos (which we discussed in a different topic) you can - they support hand gestures so you can grab and “shrink” an object. Otherwise you can create your own custom implementation based on, for example, distance between the finger and the thumb. Check it constantly, and decide when and how to set up the scaling factor of the model.

Note that, as XR works in real world units, 1 units is 1 meter in real life. Make sure your models are factored correctly, or scale them on load to make sure they are not shown incorrectly when loaded

3 Likes

Tnks RaananW
It’s working :slight_smile:

1 Like

Have any idea how to walk around the building in Xr mode. like a game, will we can enter into the building and rooms?

I’m VR you have teleportation and controller movement. In AR you will need to walk yourself :blush:

3 Likes