2021-03-1109:05 AM - last edited on 2021-09-1409:48 AM by Noemi Balogh
I created a window composed of a wallhole with four hotspots that can move in all directions to allow me to create an opening in any shape i want.
My problem is that when I move one of the corners the whole window will be moved to keep the center the window in the same position. So, if i extend one corner by 50 cm, it will only move 25 and the whole window will slide by 25 in the opposite direction.
This seems to be particular to window/door type objects, i never encountered this problem with other objects I created.
How can I change the origin or reference point of a window object so that only the corner I edit will move?
I didn't find much about this in the documentation.
The problem is that when I resize the wallhole by dragging one of the hotspots the hole will shift on the wall to keep the same center position.
So if I drag one of the hotspots by x it will only move by x/2 and the rest of the hotspots will move by x/2 in the opposite direction.
You don't need to code hotspots to stretch a wall hole If you created a window wall hole then by default the a and b nodes provided will stretch the window the way you want. Because the windows are coded from centers out you cannot use your own hot spots to change the width or height without the effect happening that you're talking about but again you don't need those because the doors and windows base nodes will control the opening size if you mapped it to the a and b parameters
Might it be about activating or deactivating the base point? What flag did you use for the base point? Just 1, 1+128 or 1+256?
Also could share a bit from your script? So we can better evaluate the structure
You should have the main rectangle use a and b variable and then code the remaining hotspots for the shape. I know as I've spent hours in the past trying to do what you are wanting and ultimately you need a defining rectangle for boundaries and then a wall hole that has hotspots for shapes that is bound by a and b respectively.
It's the same for the wall accessories of you want to define shapes by name.
Sounds like your wall hole is centred on the origin?
But you are using the full values of the width and height to stretch it.
Not sure if that explains it properly.
I would use 0,0,0 as the bottom left corner of your wallhole.
Then all the co-ordinates for the other corner hotspots should be exactly as you want them.
If you need to re-centre on the origin then use a transformation before the hotspots and wallhole command.
One of the forum moderators. Versions 6.5 to 26 Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10 Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11