I have like a robot that raycasts 10 studs ahead and gets the first track that it hit’s, then it gets the angle between the previous track and the current track and stores it in a table, similar to table a
(I copy a script I made and then paste it into the command bar). I want to group the similar angles so I can create a smooth bank on a curve, after I can get a new table like b
I want to make the banking angle smooth, so if I get this table;
local b = {
{0, 0, 0},
{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2},
{1, 1, 1, 1, 1},
...
}
and change it to
local b = {
{0, 0, 0},
{0.5, 1, 1.5, 2, 2, 2, 2, 2, 1.75, 1.5, 1.25},
{1, 1, 1, 1, 1},
...
}
Here is an image of the tracks