# Moving objects in virtual reality

**URL:** <https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402>\
**Category:** Support\
**Tags:** virtual-reality\
**Created:** [January 22, 2023, 1:09pm UTC](https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402 "2023-01-22T13:09:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vit\_P](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/vit_p/32/18127_2.png) [@Vit\_P](https://discourse.slicer.org/u/Vit_P)\
**Post date:** [January 22, 2023, 1:09pm UTC](https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402/1 "2023-01-22T13:09:03Z")

</div>

Hello good people)

I am new to 3D slicer virtual reality.

I created a 3D object in 3D Slicer 5.2.1 and launched virtual reality extension. I use HTC Vive. The object is visible in the HMG, but controllers look like totally disabled and I cannot manipulate with the object. Any other activities (Fly/Transform entire scene/Transform objects/) as described in [GitHub - KitwareMedical/SlicerVirtualReality: A Slicer extension that enables user to interact with a Slicer scene using virtual reality.](https://github.com/KitwareMedical/SlicerVirtualReality) do not work.

I exported the stl file and opened it in VRifier. All manupulations work perfectly.

Could You please suggest how to fix this problem?

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [January 22, 2023, 3:27pm UTC](https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402/2 "2023-01-22T15:27:40Z")

</div>

Very briefly, please wait until it is fixed.  
For more information do a search on discourse, there are many topics about this, and although we are now much closer to the solution, the situation is the same.

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [January 23, 2023, 10:33pm UTC](https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402/3 "2023-01-23T22:33:07Z")

</div>

To follow up, we are working on the issue and expect this to fix this shortly.

---

<div class="post-metadata">

**Author:** ![LucasGandel](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lucasgandel/32/18202_2.png) [@LucasGandel](https://discourse.slicer.org/u/LucasGandel)\
**Post date:** [January 27, 2023, 12:57pm UTC](https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402/4 "2023-01-27T12:57:08Z")

</div>

A fix is on its way, see [SlicerVirtualReality/c993cd7](https://github.com/LucasGandel/SlicerVirtualReality/commit/c993cd7c83c9aa6728c24f5b6f95f917e7a8c50c). This commit brings back the ability to grab objects and fly around.  
Although untested (yet), the multi-gesture (Pan, Pinch, Rotate) are also expected to work, but with grip buttons only.  
Please check the commit message to get an idea of the next steps.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [February 1, 2023, 12:14pm UTC](https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402/5 "2023-02-01T12:14:47Z")

</div>

Lucas, we tried the very latest commits yesterday and none of the interactions worked unfortunately with the HP headset. Maybe related to the json, not sure. This is why I asked about a way to verify the current settings, to be able to check where things break.

---

<div class="post-metadata">

**Author:** ![LucasGandel](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lucasgandel/32/18202_2.png) [@LucasGandel](https://discourse.slicer.org/u/LucasGandel)\
**Post date:** [February 1, 2023, 2:05pm UTC](https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402/6 "2023-02-01T14:05:51Z")

</div>

This is very bad news. I bet this is related to the driver, or the json.  
Was the HP headset working in previous versions of SlicerVirtualReality? Or were you using another headset?

Without recompiling VTK, I am not sure there is anything you can do to check the current bindings are correctly setup, besides adding an observer to the `vtkOpenVRRenderWindowInteractor` `AnyEvent` to see if it fires anything.  
If events are fired, the problem is with the interactor style.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [February 1, 2023, 3:37pm UTC](https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402/7 "2023-02-01T15:37:25Z")

</div>

The headset works with the older versions. I just realized there is no `OnSelect3D` function, so your commit was probably not merged. Let me cherry pick that and see what changes.

Thanks for the suggestions! I’ll add an observer if I need to find out about the events.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [February 1, 2023, 3:45pm UTC](https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402/8 "2023-02-01T15:45:15Z")

</div>

Cherry-picked your commit ([Rename VR interactor style callback functions · LucasGandel/SlicerVirtualReality@fae1799 · GitHub](https://github.com/LucasGandel/SlicerVirtualReality/commit/fae17999118b09d113b526090ae3b855d31ee3b4)) and flying and grabbing works!!

---

<div class="post-metadata">

**Author:** ![Vit\_P](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/vit_p/32/18127_2.png) [@Vit\_P](https://discourse.slicer.org/u/Vit_P)\
**Post date:** [February 3, 2023, 10:26am UTC](https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402/9 "2023-02-03T10:26:08Z")

</div>

As far as I follow it, now works. But nothing improved at me. I reloaded the 3DSlicer and still the same

Can You guide me step-by-step what I should do please?

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [February 3, 2023, 2:35pm UTC](https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402/10 "2023-02-03T14:35:29Z")

</div>

There is one commit that is not integrated yet. Lucas please let me know if it is ready to integrate (your latest branch in your fork, referenced in the issue about flying in SlicerVR).

---

<div class="post-metadata">

**Author:** ![Vit\_P](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/vit_p/32/18127_2.png) [@Vit\_P](https://discourse.slicer.org/u/Vit_P)\
**Post date:** [March 18, 2023, 8:50pm UTC](https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402/11 "2023-03-18T20:50:04Z")

</div>

Unfortunately, still does not work with the controllers to move the object in space. However, the controller does rotate/move the object if used on the Desktop interface as shown on the picture. What can be done?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/7/f7ebcdcb4e9fc6c754e6c1ab086648775328b2d5.jpeg)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [March 19, 2023, 3:53pm UTC](https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402/12 "2023-03-19T15:53:04Z")

</div>

I tried it on Friday and it works. You need to use the latest preview version 5.3.0.

---

<div class="post-metadata">

**Author:** ![Michele\_Bailo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/michele_bailo/32/67234_2.png) [@Michele\_Bailo](https://discourse.slicer.org/u/Michele_Bailo)\
**Post date:** [March 20, 2023, 11:58am UTC](https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402/13 "2023-03-20T11:58:50Z")

</div>

Hi there,  
I tried today with my HTC Vive Pro, but I’m still not able to move the entire scene altogether pressing the trigger in both controllers (which I remember I was able to do some time ago).  
I can move single object separately with the latest preview version 5.3.0, but in neurosurgical planning moving the scene altogether would be way more helpful. Is there anything I can do about it?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [March 20, 2023, 5:26pm UTC](https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402/14 "2023-03-20T17:26:09Z")

</div>

Two handed gestures are not yet fixed. What you can do is fly using the joystick or use the center view button in the VR module to set the VR camera based on the 3D view in Slicer.

---

<div class="post-metadata">

**Author:** ![Michele\_Bailo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/michele_bailo/32/67234_2.png) [@Michele\_Bailo](https://discourse.slicer.org/u/Michele_Bailo)\
**Post date:** [March 29, 2023, 11:01am UTC](https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402/15 "2023-03-29T11:01:57Z")

</div>

Thanks you very much for you kind answer.  
Can I ask you if you think that is something that is planned to be fixed in the future?  
Alternatively, would it work properly if I install back older version of 3D Slicer?

thank you very much for your patience.

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [March 29, 2023, 1:35pm UTC](https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402/16 "2023-03-29T13:35:15Z")

</div>

Although that’s by no means an acceptable solution, Slicer 4.11 should support it.

---

<div class="post-metadata">

**Author:** ![Vit\_P](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/vit_p/32/18127_2.png) [@Vit\_P](https://discourse.slicer.org/u/Vit_P)\
**Post date:** [August 13, 2023, 1:25pm UTC](https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402/17 "2023-08-13T13:25:45Z")

</div>

Hi! In 5.2.1 version moving 3D objects in VR still not fixed?

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [August 13, 2023, 3:53pm UTC](https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402/18 "2023-08-13T15:53:53Z")

</div>

Please check out the 3D Slicer preview release (5.3.0), where it is fixed.

---

<div class="post-metadata">

**Author:** ![Vit\_P](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/vit_p/32/18127_2.png) [@Vit\_P](https://discourse.slicer.org/u/Vit_P)\
**Post date:** [September 8, 2023, 7:47am UTC](https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402/19 "2023-09-08T07:47:09Z")

</div>

Could not find link to 5.3.0. Instead, updated to 5.4.0. In this, can fly through with touch on the trackpad, but grabbing and other still not possible.

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [September 8, 2023, 10:41am UTC](https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402/20 "2023-09-08T10:41:15Z")

</div>

Yes, correct, in my last test I had the same experience. Sorry!

[Next page](https://discourse.slicer.org/t/moving-objects-in-virtual-reality/27402.md?page=2)
