- Home /
Get field between x points
Hey there, I'm trying to create a "trap" skill, the way I'm trying to approach this is: The player deploys various traps, each contains a script that records triggering, I want that inside the field between those traps an effect modified by me will occur
I've been trying to build the polygon between those points, though is storing every single point inside a list the best way to do it?
Edit: I did try using convex hull but it was pretty heavy.
A good solution to know who is inside a polygon is to use an algorithm called convex hull.
I'll check that out, but if in addition I want particles inside that area? using raycasts between each trap seems not effective, and using coliders probably won't help as much.
You can add whatever you want inside.
Convex hull just tells you if a point is inside a convex polygon. The rest is up to you.