Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to check if a point is inside of a polygon?
#1
Photo 
In edit mode, I wanna be able to manually draw a polygon and attach it to the prefab similar to red one in this picture and in play mode, I want to check if a 2D point (x and z) is inside of this polygon.

Does Curvy provide a way to check if a point is inside or not?


Attached Files Thumbnail(s)
   
Reply
#2
Hi
Sorry, but there is no API method to check if a point is inside a spline. The API gives access to the spline's parameters, so any detection algorithm can be implemented on splines from Curvy Splines. Also, in case you need this, CurvySpline.Bounds provides the bounding box of the spline, and CurvyUtility.SplineToMesh allows you to produce a mesh from a spline.
I hope this helped.
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Find intersection point soccertrash 5 27 10-22-2022, 05:46 PM
Last Post: _Aka_
  Get Closest Point on Spline neppyneptune1 1 6 10-15-2022, 11:17 AM
Last Post: _Aka_
  How can I find the point on the spline after applying with offset angle+radius? Chanon 1 3 10-01-2022, 11:50 AM
Last Post: _Aka_
  How to stop spline refreshing when a control point is deleted or removed? Beaver_Boy 4 9 07-23-2022, 11:24 AM
Last Post: _Aka_

Forum Jump: