Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
70% off - flash deals
#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


Messages In This Thread
70% off - flash deals - by _Aka_ - 07-20-2025, 02:31 PM
RE: 70% off - flash deals - by jackgames - 07-23-2025, 09:04 AM
RE: 70% off - flash deals - by _Aka_ - 07-23-2025, 09:25 AM
RE: 70% off - flash deals - by jackgames - 07-23-2025, 09:38 AM
RE: 70% off - flash deals - by _Aka_ - 07-23-2025, 12:15 PM

Forum Jump: