<?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: Use Xbox controller to move the gameview operator in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/use-xbox-controller-to-move-the-gameview-operator/m-p/13542422#M48874</link>
    <description>&lt;P&gt;Thanks Phil &lt;/P&gt;
&lt;P&gt;This is super cool. the extent on what flexsim can do is mind boggling &lt;/P&gt;
&lt;P&gt;Only thing is the when I move the right toggle thumb to turn and watch, the left toggle turns is right and right toggle turns it left. look like they are switched &lt;/P&gt;
&lt;P&gt;Thanks again for everything so far &lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Raashid &lt;/P&gt;</description>
    <pubDate>Thu, 03 Nov 2016 20:14:06 GMT</pubDate>
    <dc:creator>raashid_mohammed1</dc:creator>
    <dc:date>2016-11-03T20:14:06Z</dc:date>
    <item>
      <title>Use Xbox controller to move the gameview operator</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/use-xbox-controller-to-move-the-gameview-operator/m-p/13542416#M48868</link>
      <description>&lt;P&gt;Hi&lt;/P&gt; 
&lt;P&gt;Model in the link below. It converts the operator into game mode where operator can move using keyboard up,down,left and right button &lt;/P&gt; 
&lt;P&gt;see link for more info &lt;/P&gt; 
&lt;P&gt;&lt;A rel="nofollow noopener noreferrer" href="https://answers.flexsim.com/questions/30134/is-there-a-way-to-create-a-game-in-flexsim.html" target="_blank"&gt;https://answers.flexsim.com/questions/30134/is-there-a-way-to-create-a-game-in-flexsim.html&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;Is there a way I can move the operator using Xbox controller in VR mode. both first and third person view &lt;/P&gt; 
&lt;P&gt;Thanks &lt;/P&gt; 
&lt;P&gt;Raashid &lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 19:26:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/use-xbox-controller-to-move-the-gameview-operator/m-p/13542416#M48868</guid>
      <dc:creator>raashid_mohammed1</dc:creator>
      <dc:date>2016-11-02T19:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Use Xbox controller to move the gameview operator</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/use-xbox-controller-to-move-the-gameview-operator/m-p/13542417#M48869</link>
      <description>&lt;P&gt;Raashid,&lt;/P&gt;
&lt;P&gt;have you seen this:&lt;/P&gt;
&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/questions/30260/how-i-can-use-and-configure-the-xbox-controller-in.html" target="_blank"&gt;https://answers.flexsim.com/questions/30260/how-i-can-use-and-configure-the-xbox-controller-in.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This describes where the logic can be found to manipulate control through Xbox controller.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 19:34:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/use-xbox-controller-to-move-the-gameview-operator/m-p/13542417#M48869</guid>
      <dc:creator>ralf_gruber</dc:creator>
      <dc:date>2016-11-02T19:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Use Xbox controller to move the gameview operator</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/use-xbox-controller-to-move-the-gameview-operator/m-p/13542418#M48870</link>
      <description>&lt;P&gt;Yes I did &lt;/P&gt;
&lt;P&gt;I don't really understand what below sentence means in the answer &lt;/P&gt;
&lt;P&gt;"If you want to change what the controller sticks and buttons do, you can modify the FlexScript code in the node VIEW:/standardviews/documentwindows/Perspective&amp;gt;eventfunctions/XboxInput"&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;U&gt;&lt;/U&gt;&lt;SUB&gt;&lt;/SUB&gt;&lt;SUP&gt;&lt;/SUP&gt;But this is more on how can I link the xbox controller to the custom GUI&lt;/P&gt;
&lt;P&gt;Thanks for quick reponse &lt;/P&gt;
&lt;P&gt;Raashid &lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 19:39:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/use-xbox-controller-to-move-the-gameview-operator/m-p/13542418#M48870</guid>
      <dc:creator>raashid_mohammed1</dc:creator>
      <dc:date>2016-11-02T19:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: Use Xbox controller to move the gameview operator</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/use-xbox-controller-to-move-the-gameview-operator/m-p/13542419#M48871</link>
      <description>&lt;P&gt;&lt;A href="https://answers.flexsim.com/storage/attachments/3496-game-operator-moving-boxes-first-person-xbox-input.fsm"&gt;&lt;/A&gt;&lt;A href="https://answers.flexsim.com/storage/attachments/3499-game-operator-moving-boxes-first-person-xbox-input.fsm"&gt;Attached&lt;/A&gt; is an updated version of the model from &lt;A href="https://answers.flexsim.com/questions/30134/is-there-a-way-to-create-a-game-in-flexsim.html"&gt;the original question&lt;/A&gt;, modified to use the Xbox Input code from the default Perspective View in the custom 3D Game View.&lt;/P&gt;&lt;P&gt;That game model was purposefully built with a minimal amount of extra stuff in it so that it is easier to understand. Adding Xbox Inputs adds more complexity to the code, as described below:&lt;/P&gt;&lt;P&gt;The things added to this version to make the xbox input work:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;OnPreOpen was added to the view that calls stick(num, 20) to determine what xbox controllers are connected to the computer.&lt;/LI&gt;&lt;LI&gt;Variables were added to the Perspective view to store what xbox controllers are connected and their last update time.&lt;/LI&gt;&lt;LI&gt;A function called XboxInput was added with custom code to read the xbox inputs and use them to move the operator and viewpoint.&lt;/LI&gt;&lt;LI&gt;OnPreDraw was updated to call the XboxInput function.&lt;/LI&gt;&lt;LI&gt;The code to load/unload an item was moved to its own function so that the xbox A button and the spacebar handler can both call the function.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;To handle Xbox input, I copied and modified stuff from the existing Perspective view code that is in the tree at VIEW:/standardviews/documentwindows/Perspective&amp;gt;eventfunctions/XboxInput&lt;/P&gt;&lt;P&gt;If you don't understand how referencing in the tree works, then this type of development may be more advanced than you can do by yourself right now. You may want to contact FlexSim for additional training or consulting work.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 22:13:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/use-xbox-controller-to-move-the-gameview-operator/m-p/13542419#M48871</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2016-11-02T22:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Use Xbox controller to move the gameview operator</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/use-xbox-controller-to-move-the-gameview-operator/m-p/13542420#M48872</link>
      <description>&lt;P&gt;Thanks Phil&lt;/P&gt;
&lt;P&gt;We do have a PO for training for FLEXSIM. thinking of taking it on month of December&lt;/P&gt;
&lt;P&gt;looks like it works. the GUI does not work for VR MODE &lt;/P&gt;
&lt;P&gt;Is there a way we can also add VR mode to the perceptive view &lt;/P&gt;
&lt;P&gt;Thanks &lt;/P&gt;
&lt;P&gt;Raashid &lt;/P&gt;
&lt;P&gt;I have OCULUS RIFT &lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 15:10:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/use-xbox-controller-to-move-the-gameview-operator/m-p/13542420#M48872</guid>
      <dc:creator>raashid_mohammed1</dc:creator>
      <dc:date>2016-11-03T15:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: Use Xbox controller to move the gameview operator</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/use-xbox-controller-to-move-the-gameview-operator/m-p/13542421#M48873</link>
      <description>&lt;P&gt;&lt;A href="https://answers.flexsim.com/storage/temp/3512-game-operator-moving-boxes-first-person-xbox-input.fsm"&gt;&lt;/A&gt;&lt;A href="https://answers.flexsim.com/storage/temp/3514-game-operator-moving-boxes-first-person-xbox-input.fsm"&gt;Attached&lt;/A&gt; is an updated version that adds a VR Mode button that turns on the Oculus Rift for the Perspective view in the custom Game View.&lt;/P&gt;&lt;P&gt;Changes in this version:&lt;/P&gt;&lt;P&gt;The button calls applicationcommand("switchviewvrmode", view, getchecked(c)), which toggles VR Mode on the specified view.&lt;/P&gt;&lt;P&gt;The XboxInput function handles re-centering the headset when you press the Back button:&lt;/P&gt;&lt;PRE&gt;if (wButtons &amp;amp; XINPUT_GAMEPAD_BACK)
    applicationcommand("recenteroculusrift");
&lt;/PRE&gt;&lt;P&gt;The OnPreDraw sets a timer to repaint the view with the function IdleRepaint when in VR Mode or an Xbox controller is connected. (This makes the view continuously repaint when the model isn't running.)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="3513-game-operator-moving-boxes-first-person-xbox-input.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1494459i1B11715542621AA2/image-size/large?v=v2&amp;amp;px=999" role="button" title="3513-game-operator-moving-boxes-first-person-xbox-input.png" alt="3513-game-operator-moving-boxes-first-person-xbox-input.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 15:40:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/use-xbox-controller-to-move-the-gameview-operator/m-p/13542421#M48873</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2016-11-03T15:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: Use Xbox controller to move the gameview operator</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/use-xbox-controller-to-move-the-gameview-operator/m-p/13542422#M48874</link>
      <description>&lt;P&gt;Thanks Phil &lt;/P&gt;
&lt;P&gt;This is super cool. the extent on what flexsim can do is mind boggling &lt;/P&gt;
&lt;P&gt;Only thing is the when I move the right toggle thumb to turn and watch, the left toggle turns is right and right toggle turns it left. look like they are switched &lt;/P&gt;
&lt;P&gt;Thanks again for everything so far &lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Raashid &lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 20:14:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/use-xbox-controller-to-move-the-gameview-operator/m-p/13542422#M48874</guid>
      <dc:creator>raashid_mohammed1</dc:creator>
      <dc:date>2016-11-03T20:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: Use Xbox controller to move the gameview operator</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/use-xbox-controller-to-move-the-gameview-operator/m-p/13542423#M48875</link>
      <description>&lt;P&gt;The control mechanism I implemented behaves as if the control stick was sticking out of the back of the camera. Moving the stick down rotates the camera to look up, and moving the stick left makes the camera rotate to look right. Like the stick attached to the camera in this image:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="3520-camera-operator-jobs.jpg"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1494458i54212028A8B3D1CA/image-size/large?v=v2&amp;amp;px=999" role="button" title="3520-camera-operator-jobs.jpg" alt="3520-camera-operator-jobs.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Most games will let you invert the X and Y axes within their settings if you don't like the defaults.&lt;/P&gt;&lt;P&gt;You are welcome to change the XboxInput controls if you want them to behave differently, or add more UI elements that let you customize the controls.&lt;/P&gt;&lt;P&gt;If you don't want the X-axis to be inverted, Change line 71 in the XboxInput function from:&lt;/P&gt;&lt;PRE&gt;double rx = -normalizedRY;
&lt;/PRE&gt;&lt;P&gt;to:&lt;/P&gt;&lt;PRE&gt;double rx = normalizedRY;
&lt;/PRE&gt;&lt;P&gt;You can add a negative on line 72 if you want the Y axis to not be inverted.&lt;/P&gt;&lt;P&gt;You could also customize the controls by adding check boxes that link to variables on the view and read those variables to adjust whether to multiply those values by -1 or not.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 20:37:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/use-xbox-controller-to-move-the-gameview-operator/m-p/13542423#M48875</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2016-11-03T20:37:46Z</dc:date>
    </item>
  </channel>
</rss>

