<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: VR with Oculus Quest 2 in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/vr-with-oculus-quest-2/m-p/13595308#M90230</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Please could you help me a little more? I just want a joystick that varies the run speed, but I don't understand anything about the example model&lt;/P&gt;
 &lt;P&gt;It's very important and urgent for me&lt;/P&gt;
&lt;/DIV&gt;</description>
    <pubDate>Mon, 24 Jun 2024 09:01:12 GMT</pubDate>
    <dc:creator>Clara1</dc:creator>
    <dc:date>2024-06-24T09:01:12Z</dc:date>
    <item>
      <title>VR with Oculus Quest 2</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/vr-with-oculus-quest-2/m-p/13595306#M90228</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 24.0.2 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P style="margin:0in;font-family:Calibri;font-size:11.0pt;"&gt;Hello,&lt;/P&gt;
 &lt;P style="margin:0in;font-family:Calibri;font-size:11.0pt;"&gt;I have a model of a manufacturing line in which I want to implement the use of VR with Oculus Quest.&lt;/P&gt;
 &lt;P style="margin:0in;font-family:Calibri;font-size:11.0pt;"&gt;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.&lt;/P&gt;
 &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;
 &lt;P style="margin:0in;font-family:Calibri;font-size:11.0pt;"&gt;I hope you can help me&lt;/P&gt;
 &lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/83947-oculustouchdemo-6.fsm" target="_blank"&gt;oculustouchdemo-6.fsm&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 24 Jun 2024 07:57:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/vr-with-oculus-quest-2/m-p/13595306#M90228</guid>
      <dc:creator>Clara1</dc:creator>
      <dc:date>2024-06-24T07:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: VR with Oculus Quest 2</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/vr-with-oculus-quest-2/m-p/13595307#M90229</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1719217025843.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1524354i9230027BF9562681/image-size/large?v=v2&amp;amp;px=999" role="button" title="1719217025843.png" alt="1719217025843.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Inputs from the controllers are read with the &lt;A rel="noopener noreferrer" id="isPasted" href="https://docs.flexsim.com/en/24.0/Reference/CodingInFlexSim/CommandReference/Commands.html#stick" target="_blank"&gt;stick&lt;/A&gt; command, so having a look at its documentation might help to understand the code better.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 24 Jun 2024 08:17:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/vr-with-oculus-quest-2/m-p/13595307#M90229</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2024-06-24T08:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: VR with Oculus Quest 2</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/vr-with-oculus-quest-2/m-p/13595308#M90230</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Please could you help me a little more? I just want a joystick that varies the run speed, but I don't understand anything about the example model&lt;/P&gt;
 &lt;P&gt;It's very important and urgent for me&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 24 Jun 2024 09:01:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/vr-with-oculus-quest-2/m-p/13595308#M90230</guid>
      <dc:creator>Clara1</dc:creator>
      <dc:date>2024-06-24T09:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: VR with Oculus Quest 2</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/vr-with-oculus-quest-2/m-p/13595309#M90231</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;I can try, but this is an advanced topic. I don't have a VR setup currently up and running, so I can't test this. It should work, but no promises.&lt;/P&gt;&lt;P&gt;Lines 275-346 handle gripping and moving the handle bar and its impact on the crane z-movement (since run speed is a 1-dimensional value it makes sense to use this object to control it, at least in my mind).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1719221718875.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1524359iA06A8E0EE891CD19/image-size/large?v=v2&amp;amp;px=999" role="button" title="1719221718875.png" alt="1719221718875.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Of those lines, only 339-345 deal with the actual crane movement. If you replace them with something like this&lt;/P&gt;&lt;PRE&gt;double exponent = -handle.rotation.x / 16;
runspeed(Math.pow(2, exponent));&lt;/PRE&gt;&lt;P&gt;the handle bar should then control the speed (between 1/32 to 32).&lt;/P&gt;&lt;P&gt;Removing all the other control code for the other interactive objects will leave you with the user command code as in the attached model.&lt;/P&gt;&lt;P&gt;You'd need to copy all user commands, the "Handle" object (the thing you will grip in VR) and the "HandleDraw" object (the custom object I highlighted in the answer, copy the treenode from the tree, add a new treenode to the tree of the other model and paste this in there) to the other model. Add the "Handle" global variable and make it be a tree node variable that points to the "Handle" object.&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/83949-runspeed-control.fsm" target="_blank"&gt;runspeed-control.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 24 Jun 2024 09:35:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/vr-with-oculus-quest-2/m-p/13595309#M90231</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2024-06-24T09:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: VR with Oculus Quest 2</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/vr-with-oculus-quest-2/m-p/13595310#M90232</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P style="margin:0in;font-family:Calibri;font-size:11.0pt"&gt;it works perfectly. Thank you very much, you have helped me a lot&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 26 Jun 2024 08:59:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/vr-with-oculus-quest-2/m-p/13595310#M90232</guid>
      <dc:creator>Clara1</dc:creator>
      <dc:date>2024-06-26T08:59:16Z</dc:date>
    </item>
  </channel>
</rss>

