Is Inside a polygon algorithm..
Does anyone know how to make an algorithm on how to check if a Vector3 position is inside a set of Vector3 corners?
I tried raycasting, but its not giving me the correct results.
So basicallyt the blue dots are the corners, and the red is how is where its "active" ( Where I get detected ).
The black lines is how i want it.
As said I tried raycasting and the results of that is in the image below.
I know that winding numbers would be accurate 100%, but I want to be able to have the corners in a randomized order, and not a clockwise or counterclockwise way.
Does anyone know how to do this?
Red = Zone I get detected.
Blue = The corners
Black = How I want it to work..
I tried raycasting, but its not giving me the correct results.
So basicallyt the blue dots are the corners, and the red is how is where its "active" ( Where I get detected ).
The black lines is how i want it.
As said I tried raycasting and the results of that is in the image below.
I know that winding numbers would be accurate 100%, but I want to be able to have the corners in a randomized order, and not a clockwise or counterclockwise way.
Does anyone know how to do this?
Red = Zone I get detected.
Blue = The corners
Black = How I want it to work..

