>>3661213

Yeah, I'm that guy.

>>3661236

There should be examples in the lightning script and on the tsp git but I don't recall what state the scripts are in so it may not be best to base it off those. Might be worth a look though. The best I can give you is a general description here because I'm on mobile only atm and don't have much extra time even if I wasn't, and unfortunately this will continue for the immediate future. Mobile means I can't switch tabs without the thing eating my post so I may mention a formula but not list it. You should read my last post about this in the archive for this to make sense.

So for a single quadratic bezier curve from a start to end point, with curving only in the xy plane:

Grab position of origin and end actors/positions, calculate offsets if applicable, store all values. Calculate xy distance and xy angle from origin to end, store both.

Store new origin and end points, origin will be (0,0) and end will be (xy distance, 0). Pick a random positive or negative value, base it upon the total xy distance, can even be more than that but you want it based on the total so the curve is proportional. Store this value, we'll call it bzy.

Now you start your loop. Loop iteration can be any number, more or less based upon distance is probably a good starting point.

First thing in the loop you calculate is your t, t is clamped to values between 0 and 1.0 so for a loop from 0 to max, i being loop variable, I just divided i by max, both values converted to fixed.

Next you calculate your bezier curves. X value is just linear bezier curve from 0 to xy distance. Y is a quadratic bezier curve from 0 to 0 but using bzy as the curve point. Now you have both of these, we rotate back to actual start and end points (next post.)