question

Clara avatar image
0 Likes"
Clara asked Clara commented

VR with Oculus Quest 2

Hello,

I have a model of a manufacturing line in which I want to implement the use of VR with Oculus Quest.

I want to do something simple like put a joystick that, when moved, varies "run speed" in the model. I don't know how to do it, I'm using the example of the model with VR but even so, I still don't know.


I hope you can help me

oculustouchdemo-6.fsm

FlexSim 24.0.2
virtual realityoculus quest 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.

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Clara commented

The interaction with the model is handled entirely in the "OnModelPreDraw" user command in the demo model (which calls some of the other user commands). It is run each time before a new frame is generated (through the custom "HandleDraw" object that was added to the tree).

1719217025843.png

I suggest you have a look at that code. There are some comments to show what each code section is roughly responsible for and the variable names are generally chosen so that the code should be understandable to anyone who has some coding experience.

Inputs from the controllers are read with the stick command, so having a look at its documentation might help to understand the code better.


1719217025843.png (35.9 KiB)
· 3
5 |100000

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