<?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: vector compass in Maya Dynamics Forum</title>
    <link>https://forums.autodesk.com/t5/maya-dynamics-forum/vector-compass/m-p/7400395#M4871</link>
    <description>&lt;P&gt;constrain a couple of locators to the objects determining which way is up, then put this into an expression&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;float $pos1[] = `pointPosition -w "locator1"`;&lt;/P&gt;&lt;P&gt;float $pos2[] = `pointPosition -w "locator2"`;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;float $gX = $pos1[0] - $pos2[0];&lt;/P&gt;&lt;P&gt;float $gY = $pos1[1] - $pos2[1];&lt;/P&gt;&lt;P&gt;float $gZ = $pos1[2] - $pos2[2];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;nucleus.gravityDirectionX = $gX;&lt;/P&gt;&lt;P&gt;nucleus.gravityDirectionY = $gY;&lt;/P&gt;&lt;P&gt;nucleus.gravityDirectionZ = $gZ;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Sep 2017 04:42:22 GMT</pubDate>
    <dc:creator>magillaGuerilla</dc:creator>
    <dc:date>2017-09-22T04:42:22Z</dc:date>
    <item>
      <title>vector compass</title>
      <link>https://forums.autodesk.com/t5/maya-dynamics-forum/vector-compass/m-p/7400338#M4870</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Would anyone care to share some code or a link to explain how to create a vector compass?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to plug the result into field directions - say to control the animated direction of gravity or wind.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It would be infinitely&amp;nbsp;easier if the fields actually&amp;nbsp;just took their orientation from the object.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2017 03:23:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-dynamics-forum/vector-compass/m-p/7400338#M4870</guid>
      <dc:creator>magillaGuerilla</dc:creator>
      <dc:date>2017-09-22T03:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: vector compass</title>
      <link>https://forums.autodesk.com/t5/maya-dynamics-forum/vector-compass/m-p/7400395#M4871</link>
      <description>&lt;P&gt;constrain a couple of locators to the objects determining which way is up, then put this into an expression&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;float $pos1[] = `pointPosition -w "locator1"`;&lt;/P&gt;&lt;P&gt;float $pos2[] = `pointPosition -w "locator2"`;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;float $gX = $pos1[0] - $pos2[0];&lt;/P&gt;&lt;P&gt;float $gY = $pos1[1] - $pos2[1];&lt;/P&gt;&lt;P&gt;float $gZ = $pos1[2] - $pos2[2];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;nucleus.gravityDirectionX = $gX;&lt;/P&gt;&lt;P&gt;nucleus.gravityDirectionY = $gY;&lt;/P&gt;&lt;P&gt;nucleus.gravityDirectionZ = $gZ;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2017 04:42:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-dynamics-forum/vector-compass/m-p/7400395#M4871</guid>
      <dc:creator>magillaGuerilla</dc:creator>
      <dc:date>2017-09-22T04:42:22Z</dc:date>
    </item>
  </channel>
</rss>

