how to find a empty space then filling it?
in
Programming Questions
•
2 years ago
Hi all,
Could someone give me the heads up on how i would go about filling an empty space with objects I'm thinking of different sized triangles for now but would like to use this later using more complex shapes.
I'm guessing I could some how either turn the space into an arrayed grid and then ask each pixel if it has an object on it or not via some sort of collision detection.
Another way i think i could go about this by creating some sort of mask. each object would have a mask (black). a script would look at the "scene" detect the black areas. Then any white space would then be detected and filled up.
im just guessing these solutions up, any help would be much appreciated
thanks ;)
1