<?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: GDL - 2 moving angle hotspots in one place in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/GDL-2-moving-angle-hotspots-in-one-place/m-p/580255#M6059</link>
    <description>&lt;P&gt;Wrong type of hotspot? Angle Hotspots should have 4 nodes. Center, moving, base, reference. Ideally, they would also include a&amp;nbsp;&lt;EM&gt;Cosine&amp;nbsp;&lt;/EM&gt;function to keep the hotspots position consistant relative to the inputted rotation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From one of my objects:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;						hotspot ProWidth / 2,	0,	0,																								unID,	ProPitch,	6			:unID = unID + 1		!Bottom Left center
						hotspot ProWidth / 2,	0,	ProLength,																						unID,	ProPitch,	5			:unID = unID + 1		!moving
						hotspot ProWidth / 2,	0 - ProLength * sin (phi),	ProLength - (2 * ProLength * sin (phi / 2)) * cos ((180-phi)/2),			unID,	ProPitch,	4+128			:unID = unID + 1		!base
						hotspot ProWidth / 2,	0,	0,																								unID,	ProPitch,	7			:unID = unID + 1		!Top Right center&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are wanting both your horizontal and vertical hotspot to overlap, you would need to include the trig functions in both your x and y parameters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ling.&lt;/P&gt;</description>
    <pubDate>Thu, 14 Dec 2023 02:16:24 GMT</pubDate>
    <dc:creator>Lingwisyer</dc:creator>
    <dc:date>2023-12-14T02:16:24Z</dc:date>
    <item>
      <title>GDL - 2 moving angle hotspots in one place</title>
      <link>https://community.graphisoft.com/t5/GDL/GDL-2-moving-angle-hotspots-in-one-place/m-p/580113#M6050</link>
      <description>&lt;P&gt;Hello everyone&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am making a GDL based camera with changeable geometry, projection, ect.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have 2 variables hr &amp;amp; vr (Horizontal rotation &amp;amp; Vertical rotation)&lt;/P&gt;
&lt;P&gt;and I want moving hotspots to be set in the same position.&lt;/P&gt;
&lt;P&gt;Can you please tell me what am I doing wrong?&lt;/P&gt;
&lt;P&gt;I know that you can do that kind of thing in 2d for text for "free movement" witch I have done, is it even possible to do that kind of thing for angle, if no I was trying to set hotspots in the same plane like hr is (0,1,0) and vr is (0,2,0) But I am having troubles with planes of rotation for example (vr) needs to be on my vatical plane and hr on horizontal, but horizontal in on vertical plane...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here is my chuck of code for rotation:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;	    add 0,-bcmd1/2,-bcmd1/2
	    block bcml1,bcmd1,bcmd1
	    del 1
	    add bcml1,-bcmd2/2,-bcmd2/2
	    block bcml2,bcmd2,bcmd2
	    del 1
	    addx bcml
        ! ------------------------------------------------------------------------------
        ! HOTSPOTS
        ! ------------------------------------------------------------------------------
        unID=0
        !--- BASE HOTSPOTS ---!
        hotspot bcrhl+bcol,0,0,unID,vr,4+128,vr	:unID=unID+1					!BASE FOR VR
        hotspot bcrhl+bcol,0,0,unID,hr,4,hr	:unID=unID+1						!BASE FOR HR
	    rotz hr 
	    roty vr    
        !--- Vertical rotation (vr) ---!
        hotspot bcrhl,0,0,unID,vr,5,vr	:unID=unID+1							!MOVEING
        hotspot 0,0,0,unID,vr,6,vr	:unID=unID+1								!CENTAR
		hotspot bcrhl+bcol,bch,0,unID,vr,7,vr	:unID=unID+1					!REFERENCE
    
        !--- Horizontal rotation (hr) ---!
        hotspot bcrhl,0,0,unID,hr,5,hr	:unID=unID+1							!MOVEING
        hotspot 0,0,0,unID,hr,6,hr	:unID=unID+1								!CENTAR
		hotspot 0,bcrhl+bcol,0,unID,hr,7,hr	:unID=unID+1						!REFERENCE
        
	    add -bcbd/2,-bcbd/2,-bcbd/2
	    block bcrhl+bcbd/2,bcbd,bcbd
	    del 1
	    add bcrhl,-bcw/2,-bch/2
	    block bcl,bcw,bch
	    del 4&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DomagojLukinic_0-1702459232239.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/50441i63E2791BA75A8ACF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DomagojLukinic_0-1702459232239.png" alt="DomagojLukinic_0-1702459232239.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 11:32:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/GDL-2-moving-angle-hotspots-in-one-place/m-p/580113#M6050</guid>
      <dc:creator>Domagoj Lukinic</dc:creator>
      <dc:date>2024-09-26T11:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: GDL - 2 moving angle hotspots in one place</title>
      <link>https://community.graphisoft.com/t5/GDL/GDL-2-moving-angle-hotspots-in-one-place/m-p/580255#M6059</link>
      <description>&lt;P&gt;Wrong type of hotspot? Angle Hotspots should have 4 nodes. Center, moving, base, reference. Ideally, they would also include a&amp;nbsp;&lt;EM&gt;Cosine&amp;nbsp;&lt;/EM&gt;function to keep the hotspots position consistant relative to the inputted rotation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From one of my objects:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;						hotspot ProWidth / 2,	0,	0,																								unID,	ProPitch,	6			:unID = unID + 1		!Bottom Left center
						hotspot ProWidth / 2,	0,	ProLength,																						unID,	ProPitch,	5			:unID = unID + 1		!moving
						hotspot ProWidth / 2,	0 - ProLength * sin (phi),	ProLength - (2 * ProLength * sin (phi / 2)) * cos ((180-phi)/2),			unID,	ProPitch,	4+128			:unID = unID + 1		!base
						hotspot ProWidth / 2,	0,	0,																								unID,	ProPitch,	7			:unID = unID + 1		!Top Right center&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are wanting both your horizontal and vertical hotspot to overlap, you would need to include the trig functions in both your x and y parameters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ling.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 02:16:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/GDL-2-moving-angle-hotspots-in-one-place/m-p/580255#M6059</guid>
      <dc:creator>Lingwisyer</dc:creator>
      <dc:date>2023-12-14T02:16:24Z</dc:date>
    </item>
  </channel>
</rss>

