Copy link to clipboard
Copied
Here's a mockup of I'd like to do:
(click to see animated GIF)
The smaller square layer is "attached" to a corner of the larger solid. As the larger solid moves, the square maintains its relative position. It also rotates along with it. However, when the larger solid is scaled, the square remains at the same size.
Try this:
s = parent.transform.scale/100;
[value[0]/s[0],value[1]/s[1]]
Dan
Copy link to clipboard
Copied
You could just parent the smaller square to the larger and use an expression like this to counteract the scale of the parent:
s = parent.transform.scale[0]/100;
value/s
Dan
Copy link to clipboard
Copied
I will try that. Thank you!
Copy link to clipboard
Copied
That works great, Rick. But it breaks if I non-proportionally scale my parent.
Would this work?
sx = parent.transform.scale[0]/100
sy = parent.transform.scale[1]/100
[value/sx,value/sy]
Copy link to clipboard
Copied
Try this:
s = parent.transform.scale/100;
[value[0]/s[0],value[1]/s[1]]
Dan
Copy link to clipboard
Copied
Thanks Dan! Worked like a charm!