<?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: HTC Vive - Measuring The Distance Between The Two Controllers in Stingray Forum (Read Only)</title>
    <link>https://forums.autodesk.com/t5/stingray-forum-read-only/htc-vive-measuring-the-distance-between-the-two-controllers/m-p/7095703#M8919</link>
    <description>&lt;P&gt;Paul this is fantastic, thank you so much for taking the time to write this for me. I'm yet to try it out but it looks exactly what i'm after. Brilliant!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's also given me an insight into possibly using other lua functions like this in custom flow nodes and how to do it!&lt;/P&gt;</description>
    <pubDate>Fri, 19 May 2017 14:47:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-05-19T14:47:28Z</dc:date>
    <item>
      <title>HTC Vive - Measuring The Distance Between The Two Controllers</title>
      <link>https://forums.autodesk.com/t5/stingray-forum-read-only/htc-vive-measuring-the-distance-between-the-two-controllers/m-p/7094948#M8913</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm looking into building in some functionality similar to Live Design into one of my projects, where you can pick up an object and scale it by pulling your controllers apart.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm assuming this is based on some calculation of the distance between the two hand controllers tied to the scale of the object.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can i set this up in flow? I just need a way to get a numeric variable that is the distance, i think i can handle converting that to a scale factor.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm seeing some possibilities with the 'length' node, but i'm not sure how to get the vector that plugs into that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any advice would be greatly appreciated!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 08:57:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/stingray-forum-read-only/htc-vive-measuring-the-distance-between-the-two-controllers/m-p/7094948#M8913</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-19T08:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: HTC Vive - Measuring The Distance Between The Two Controllers</title>
      <link>https://forums.autodesk.com/t5/stingray-forum-read-only/htc-vive-measuring-the-distance-between-the-two-controllers/m-p/7095460#M8916</link>
      <description>&lt;P&gt;The easiest way to accomplish this is to use the distance function from lua. &amp;nbsp;Unfortunately there isn't a flow node for this. &amp;nbsp;It can be easily created however.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://help.autodesk.com/view/Stingray/ENU/?guid=__lua_ref_obj_stingray_Vector3_html" target="_blank"&gt;http://help.autodesk.com/view/Stingray/ENU/?guid=__lua_ref_obj_stingray_Vector3_html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once you have the distance, simply plug in the vector location of your controllers.&lt;/P&gt;
&lt;P&gt;I will give you the required code in a few minutes, just need to write the flow node myself. &amp;nbsp;Once complete ill post a followup with the function calls and the flow node.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Paul&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 13:16:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/stingray-forum-read-only/htc-vive-measuring-the-distance-between-the-two-controllers/m-p/7095460#M8916</guid>
      <dc:creator>paul.kind</dc:creator>
      <dc:date>2017-05-19T13:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: HTC Vive - Measuring The Distance Between The Two Controllers</title>
      <link>https://forums.autodesk.com/t5/stingray-forum-read-only/htc-vive-measuring-the-distance-between-the-two-controllers/m-p/7095528#M8917</link>
      <description>&lt;P&gt;Ok, Got it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is what you need to do.&lt;/P&gt;
&lt;P&gt;1. Download the package attached. Unzip.&lt;/P&gt;
&lt;P&gt;2. Put the 2 script files in the following locations in your project.&lt;/P&gt;
&lt;P&gt;-- math_nodes.lua ---&amp;gt;&amp;gt; scripts/lua/&lt;/P&gt;
&lt;P&gt;-- math_nodes.global_script_flow_nodes --&amp;gt;&amp;gt; scripts/&lt;/P&gt;
&lt;P&gt;3. In the scripts/lua file, find project.lua and open it.&lt;/P&gt;
&lt;P&gt;4. add the following line directly below require 'script/lua/flow_callbacks' found on the top of the file.&lt;/P&gt;
&lt;PRE&gt;require 'script/lua/math_nodes'&lt;/PRE&gt;
&lt;P&gt;5. Save the script file. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your flow you should now find a new category called "custom scripts" and within it you will find your distance node. &amp;nbsp;It looks something like this.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline"&gt;&lt;img /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="distance.PNG" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/358033i6A84F02385A60445/image-size/large?v=v2&amp;amp;px=999" role="button" title="distance.PNG" alt="distance.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 13:45:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/stingray-forum-read-only/htc-vive-measuring-the-distance-between-the-two-controllers/m-p/7095528#M8917</guid>
      <dc:creator>paul.kind</dc:creator>
      <dc:date>2017-05-19T13:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: HTC Vive - Measuring The Distance Between The Two Controllers</title>
      <link>https://forums.autodesk.com/t5/stingray-forum-read-only/htc-vive-measuring-the-distance-between-the-two-controllers/m-p/7095703#M8919</link>
      <description>&lt;P&gt;Paul this is fantastic, thank you so much for taking the time to write this for me. I'm yet to try it out but it looks exactly what i'm after. Brilliant!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's also given me an insight into possibly using other lua functions like this in custom flow nodes and how to do it!&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 14:47:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/stingray-forum-read-only/htc-vive-measuring-the-distance-between-the-two-controllers/m-p/7095703#M8919</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-19T14:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: HTC Vive - Measuring The Distance Between The Two Controllers</title>
      <link>https://forums.autodesk.com/t5/stingray-forum-read-only/htc-vive-measuring-the-distance-between-the-two-controllers/m-p/7096339#M8928</link>
      <description>&lt;P&gt;Fantastic, lemme know if you need any help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, please mark as solved if it worked out for you. &amp;nbsp;Helps us a lot here on our side. &amp;nbsp;Otherwise we have open issues and it slows us from helping non-solved issues.&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 18:56:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/stingray-forum-read-only/htc-vive-measuring-the-distance-between-the-two-controllers/m-p/7096339#M8928</guid>
      <dc:creator>paul.kind</dc:creator>
      <dc:date>2017-05-19T18:56:34Z</dc:date>
    </item>
  </channel>
</rss>

