BezierPath, an easy to use and optimized spline path module for TD games and general paths

Yup I just needed it to calculate once only so I have the data points

oh jesus please marry me, this is perfect

is there a way to calculate the perfect curve size, cause once the size of a curve is too big it starts to act strangely.

the module already calculates the perfect curve size. if a curve is too big it will clamp it to the best curve that wont cause the curve to collapse on itself

oh thats nice! but I’ve found that it acts very oddly like random speed ups and slow downs before and after a curve if the curve size is too big, any reason for this?

I also encountered an odd bug where if I had too many points the path would freak out. Though that could just be cause of my average coding skills

the slowdown and speedup is because that bezierpath doesn’t have arc length reparameterization implemented. i didn’t add it cause for my own personal use case it wasn’t needed so i didn’t implement it in version 2. but if you are interesting version 1 does have it and you can easily import it into version 2. as for the second issue no clue what the cause could be

Is there a way of getting a position on a path in x studs? So it takes in corners and etc and always returns a position that is on the path and x studs away?

is there anyway to get the t value from a cframe?

Can’t you just take the position (cframe.Position) of the cframe and use that?

what im trying to do is to handle spawn in other enemy positions, using only the spawntime, but if the speed value is higher than the og enemy, it would spawn with more progress than the original enemy, or when the speed is less, it would spawn with less progress.
i dont know if im explaining well

if you want to spawn an enemy in an enemies position just create a new enemy and set its progress to the progress of the enemy that spawned it (progress being the T value)

thats what im doing, but it doesnt work like that because the server doesnt gives the progress to the clients, the clients calculate it by getting the spawn time, wich the server does send, but only when the enemy spawns. so what im trying to do is change the spawning time, to make the progress be what its supposed to be when slowed or spawned with some progress.
the same issue logan had, but im looking for other solution from what you gave him

so i set it up and it works, what i wanted was to set the spawn time to another value when the speed and that worked, tho i asked chatgpt the formula bc im too lazy to think it myself

What function is the calculation in v.1 in? I can’t find it lol.

its in the InterpolateT method. theres also the CreateSectionLookup

1 Like

how would this work with a zombie type game where players are constantly moving?

for that you’ll need to use something else.
this module is designed for predefined, static paths. if your goal is constantly changing look more into pathfinding and different pathfinding algorithms.

1 Like

I can’t find the method. What version was the last one it was available in?

its in the 1.x version. and i need to add more messages to send lalala

Uhm, I might be stupid to ask this but, how can I see older versions of the module on the GitHub?