07-23-2025, 09:25 AM
Hi,
I will call the points 1, 2 and 3 as P1, P2, and P3.
P1P2 is the vector between P1 and P2.
Normally, any check needed to validate a placement should be done before the placement, and thus before updating the spline. This means that the check should not be done by the spline. I personally would implement it similarly to this:
bool canPlace = Vector3.Angle(P2P1, P2P3) < 45;
Regardless, yes you can use Curvy Spline's API to get the tangent (direction) of the spline at any point, thus you can calculate the angle between the tangent at P2 and another point (either P1, or any point in between them).
The method to use is CurvySpline.GetTangent(...)
Did I answer your question?
I will call the points 1, 2 and 3 as P1, P2, and P3.
P1P2 is the vector between P1 and P2.
Normally, any check needed to validate a placement should be done before the placement, and thus before updating the spline. This means that the check should not be done by the spline. I personally would implement it similarly to this:
bool canPlace = Vector3.Angle(P2P1, P2P3) < 45;
Regardless, yes you can use Curvy Spline's API to get the tangent (direction) of the spline at any point, thus you can calculate the angle between the tangent at P2 and another point (either P1, or any point in between them).
The method to use is CurvySpline.GetTangent(...)
Did I answer your question?
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Please consider leaving a review for Curvy, this helps immensely. Thank you.

