Hi there, I have just started delving into the world of GDL. I have encountered a problem and would like to ask our experts.
Here is what I want to achieve:
I have scripted a 2d line (we will call it Main Line) and another 2d line perpendicular to the first one (Perpendicular Line). I want to move the Perpendicular Line along the MAin Line using hotspots. I want to be able to input the position of the Perpendicular Line with 2 methods (parameters) that are mutually connected.
The first parameter is the x position along the Main Line. The second parameter is the % along the Main Line. For example, if Main Line is 10m, and I want to position the Perpendicular Line at 3/4 of the Main Line, I can input in the first parameter 7,5m or in the second parameter 0,75. Either one I choose to change, I want it to automatically update the second one.
I have been able to accomplish this in the objects settings dialog, but not through hotspots.
The hotspots problem:
Changing the x coordinate along the Main Line, is done. Changing the % value is challenging and I was not able to make it work. It works if the Main Line is max 1m long; if it is not, the % value will change only if my mouse is between the origin of the Main Line and 1m from it (as I have defined a range of (0.0, 1.0) for the % parameter).
Then comes the problme of applying both these hotspots in the object.
Does anybody have any tips?