StrangerSam Posted March 3, 2020 Share Posted March 3, 2020 (edited) Hello I'm working on a procedural building and actually i'm stuck with something. I've tried many thing but it doesn't work. I'm trying to add or remove the number of the window when I change the size of the building. I've wrote this and i've tried to add an offset to keep a space between 2 windows but I didn't find how. vector mypt = getbbox_size("../box1")/getbbox_size("../box2"); //box2(window), box1(building) float dist = distance(@P, mypt); if(dist > ch("distance")){ removepoint(0, @ptnum); } if(dist < ch("distance")){ addpoint(0, @ptnum); } Is someone can help me with that Thank you https://youtu.be/iwNiS0YTCms Edited March 4, 2020 by StrangerSam Quote Link to comment Share on other sites More sharing options...
DBaciu Posted March 27, 2020 Share Posted March 27, 2020 With vector mypt you're kind of finding how many small boxes fit into a bigger one... But distance from a point to that vector (mypt) doesn't make any sense. You should start from this. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.