Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
70% off - flash deals
#1
Information 
Curvy Splines will be available at a 70% discount on the 22nd of July.
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply
#2
Considering buying this - one function I need is to be able to evaluate if the spline being drawn at runtime (when a user puts down two points) has any angles that exceed a set degree

For example, player puts down endpoint1, and then endpoint 2, then 3 ... I want to calculate if any angle exceeds 45 degrees and make it an invalid placement

Easily possible?
Reply
#3
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?
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply
#4
(07-23-2025, 09:25 AM)_Aka_ Wrote: 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?


Thanks for that - I think so ... the reason I want the spline to exist, and be drawing, is I want it similar to a Satisfactory conveyor in the it draws, but turns the mesh red to indicate it is too sharp (also want ot be able to check collisions along the spline for the same reason)
Reply
#5
I understand, makes sense. Feel free to ask further questions.
Have a nice day.
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply


Forum Jump: