2023-04-25 12:47 PM - last edited on 2023-05-23 04:34 PM by Rubia Torres
Hello all,
I have recently started out with GDL scripting and try to improve step by step by editing a general collection of 2D furniture objects. So far I managed to work with simple commands like Glob Scale and different varients of the "IF" command.
The next step would be to modify my objects so it is possible to move and rotate different components via hotspots. I added two screnshots to clarify what my intentions are.
Can anyone hint me to some pointers or commands on how to achieve these modifications?
Many thanks in advance.
Solved! Go to Solution.
2023-04-26 03:44 AM - edited 2023-04-26 03:52 AM
gdl cookbook david nicholson cole
There is the version 3.1 PDF and large parts of the 4.0 that were made available by Nicholson Cole himself. The print book if you find it anywhere is a great resource too for your first months/years with GDL.
The sections you are looking for specifically are the two “Graphical Hotspots!” in 4.0. In case it helps with the PDF search, the file names are
CB4_150_G_HotspotIntro.pdf
CB4_160_GHS_examples.pdf
2023-04-25 02:36 PM
Gdl manual is under pdf help. It has the information on hotspots
2023-04-25 02:51 PM
Thank you for your suggestion. I already looked the general GDL manual up but still I couldn't figure it out. Graphisoft provides some tutorials (like this one: https://gdl.graphisoft.com/gdl-basics/hotspots-graphical-editing) yet I'm not able to understand the overall concept of the hotspot function. Like how can I apply the Hotspot rotation to for example a whole object, like the chair in my screenshot?
Many thanks. 🙂
2023-04-25 05:08 PM
ok, what you need to do is create a variable of distance in parameter for example "movex" then add a line in the script before draw the object something like "add2 movex,0" , and create the hotspot dynamic (pink one) to move it on the screen
hotspot2 0,0,1,movex, 1+128 !1 is for base point and 128 is for hide it
hotspot2 -1,0,2,movex,3 !3 this reference create a vector always oposite where you will move
hotspot2 movex,0,3,movex,2 !is will be the pink dot
2023-04-25 05:18 PM
for rotation create a angle variable in Parameters with the name turnZ
hotspot2 0,0,4,turnZ,6+128 !this is the rotation center hide
hotspot2 1,0,5,turnZ, 4 !this is base point where star your rotation
hotspot2 0.9*cos(turnZ), 0.9*sin(turnZ),6,turnZ,5 !this is the moving angle
2023-04-26 03:44 AM - edited 2023-04-26 03:52 AM
gdl cookbook david nicholson cole
There is the version 3.1 PDF and large parts of the 4.0 that were made available by Nicholson Cole himself. The print book if you find it anywhere is a great resource too for your first months/years with GDL.
The sections you are looking for specifically are the two “Graphical Hotspots!” in 4.0. In case it helps with the PDF search, the file names are
CB4_150_G_HotspotIntro.pdf
CB4_160_GHS_examples.pdf