question

Elodie G avatar image
2 Likes"
Elodie G asked Samantha Y commented

How to interact with the objects using VR? (Oculus Rift and Touch)

Hello,
I am building a micromanufacturing unit and I would like to interact with it using the Oculus Rift and Touch. To be more precise, I would like to be able to open a door, press some buttons and grab objects (for the moment).
Is there an easy way to do this? Or the only way is by writing some code like in the oculustouchdemo-6 ( in UserCommand, defining the Variables etc..).
Any help is welcome!
Thank you.

Elodie

FlexSim 17.1.0
vrobjectoculus riftoculus
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Samantha Y avatar image Samantha Y commented ·

@Elodie G Hi Elodie, I am using Oculus Rift and Touch, too, and I would like to build a model which can open a door and also press a buttons, but I cannot figure out how to make it by the flexsim demo. Any chances that you can send me see your model so that I can make a reference on it? Thanks a lot.

0 Likes 0 ·

1 Answer

·
Phil BoBo avatar image
4 Likes"
Phil BoBo answered Phil BoBo commented

There is not an easy way to do this right now. The way to do it is by following the example in oculustouchdemo-6: write custom code within OnPreDraw that reads the locations and status of the controllers and then reacts with the objects in your model how you desire.

· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Elodie G avatar image Elodie G commented ·

Hello,
Thank you for your answer. I am now trying to make a door open but I have some problems. It will be very helpful if you could give me some hints on how was built the handle. It is an unique object but it has parts that can be grabbed with the Oculus touch and others not. And it also has a defined axis of rotation. I would like to create a door in a similar way.
Thank you for your help.

Elodie

0 Likes 0 ·
Phil BoBo avatar image Phil BoBo ♦♦ Elodie G commented ·

Here's a picture and an explanation of how the Handle object was designed:

1. The object is designed so that its location, size, and rotation (the yellow box) is around the interactive part of the object. This makes the math easier for calculating whether the hand is touching the object.

2. The other parts of the object are components in the Animations and Components window.

3. The object is given a centroid attribute of 2, with subnodes controlling the x,y,z location of the object's rotational center. This makes it so that the object can rotate from a location that isn't the center of its yellow box.

3 Likes 3 ·
vr-handle.png (595.4 KiB)
vr-handle.png (591.6 KiB)

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.