<?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: How to set AGV project-oriented fix in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-agv-project-oriented-fix/m-p/13567875#M68930</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/225/steven.c.html" nodeid="225"&gt;@steven.chen&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;One way to do this would be to add the following code to the AGV's "On Draw" trigger.&lt;/P&gt;&lt;PRE&gt;if(current.subnodes.length &amp;gt; 0) &amp;nbsp; &amp;nbsp;{
&amp;nbsp; &amp;nbsp;&amp;nbsp;for(int i = 1; i &amp;lt;= current.subnodes.length; i++)&amp;nbsp; &amp;nbsp;&amp;nbsp;{
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;current.subnodes&lt;I&gt;.as(Object).rotation.z = 0 - current.rotation.z;
&amp;nbsp; &amp;nbsp;&amp;nbsp;}
}&lt;/I&gt;&lt;/PRE&gt;&lt;P&gt;This constantly changes the orientation of the object to be 0 minus the current rotation of the AGV. So, when the AGV is rotated 90 degrees, the item is rotated -90, or 0. Likewise, when an AGV is rotated -90 degrees, the item is rotated +90, or 0.&lt;/P&gt;&lt;P&gt;Here's the model that I built as an example. Let me know if this helps.&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/28702-agv-fix-rotation.fsm" target="_blank"&gt;agv fix rotation.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 20 May 2020 17:01:00 GMT</pubDate>
    <dc:creator>tanner_p</dc:creator>
    <dc:date>2020-05-20T17:01:00Z</dc:date>
    <item>
      <title>How to set AGV project-oriented fix</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-agv-project-oriented-fix/m-p/13567874#M68929</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 20.1.2 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;How to keep the item on the AGV in the same direction without changing the direction of the item because of any AGV turning.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance,&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 20 May 2020 02:33:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-agv-project-oriented-fix/m-p/13567874#M68929</guid>
      <dc:creator>mail7WJMZ</dc:creator>
      <dc:date>2020-05-20T02:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to set AGV project-oriented fix</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-agv-project-oriented-fix/m-p/13567875#M68930</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/225/steven.c.html" nodeid="225"&gt;@steven.chen&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;One way to do this would be to add the following code to the AGV's "On Draw" trigger.&lt;/P&gt;&lt;PRE&gt;if(current.subnodes.length &amp;gt; 0) &amp;nbsp; &amp;nbsp;{
&amp;nbsp; &amp;nbsp;&amp;nbsp;for(int i = 1; i &amp;lt;= current.subnodes.length; i++)&amp;nbsp; &amp;nbsp;&amp;nbsp;{
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;current.subnodes&lt;I&gt;.as(Object).rotation.z = 0 - current.rotation.z;
&amp;nbsp; &amp;nbsp;&amp;nbsp;}
}&lt;/I&gt;&lt;/PRE&gt;&lt;P&gt;This constantly changes the orientation of the object to be 0 minus the current rotation of the AGV. So, when the AGV is rotated 90 degrees, the item is rotated -90, or 0. Likewise, when an AGV is rotated -90 degrees, the item is rotated +90, or 0.&lt;/P&gt;&lt;P&gt;Here's the model that I built as an example. Let me know if this helps.&lt;/P&gt;&lt;P&gt;&lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/28702-agv-fix-rotation.fsm" target="_blank"&gt;agv fix rotation.fsm&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 20 May 2020 17:01:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-agv-project-oriented-fix/m-p/13567875#M68930</guid>
      <dc:creator>tanner_p</dc:creator>
      <dc:date>2020-05-20T17:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to set AGV project-oriented fix</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-agv-project-oriented-fix/m-p/13567876#M68931</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/225/steven.c.html" nodeid="225"&gt; @steven.chen&lt;/A&gt;, was my answer helpful? If so, please click the red "Accept" button on the answer. Otherwise, feel free to comment back with more information so we can help. Thanks!&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 Jun 2020 21:04:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-to-set-agv-project-oriented-fix/m-p/13567876#M68931</guid>
      <dc:creator>tanner_p</dc:creator>
      <dc:date>2020-06-03T21:04:49Z</dc:date>
    </item>
  </channel>
</rss>

