# Bhristt's Bezier Curve Module (Tween support)

Looks pretty nice for a free module, Is it optimized though?

hello! how will i go on about making the cframe tween of the part also have fromeuruleranglesxyz applied at the same time?

I want to thank you for this Module. There are several out there that performs bezier tweens, but I particularly love this one due to the real time path node change in position affecting the object already in motion. Such a nice feature. Creates some really nice organic-like path movements. Thank you.

Is there any built-in way to convert a position to a point in the curve? “CalculatePositionAt” seems to do the exact opposite, so right now the closest I managed to get was this:

``````local Start, End, Current = Points[1].Position, Points[#Points].Position, RootPart.Position
local NumCurrent = string.format("%.2f", ((Current - Start).Magnitude / (End - Start).Magnitude))
``````

Which seems to work fine at the moment, but is probably innacurate as it uses the magnitude between the start and the end points of the curve instead of the actual curve’s length or whatever metric the actual module uses (normally I just avoid making a post and just fork whatever feature is missing in, but maths are not my thing).

I imagine this isn’t getting any updates anymore (which is totally alright), but I think it’d be cool if we had more control over the tweening functions such as letting us start from a custom percentage (so if for example in my game I wanna make it so when players touch a point in the curve, the tween starts from said point) and letting us decide at what point of the curve the tween ends (which I got working by inverting the NumberValue so the tween plays in reverse based on what end is closest, but I don’t think this is ideal).

There’s also Catmull-Rom Splines which I imagine would be nice for having more control over the curves, but I can’t really imagine how complicated supporting something like that would really be.

Regardless of the previous, thank you, been using this since july of last year for cutscenes, visual curves and such (currently trying to use it for rail grinding), and it’s extremely useful and way more accessible than any of the alternatives I’ve seen so far, so huge thanks for making such a well made module.

1 Like

I’ve already made a module for Catmull-Rom Splines, you should check it out!

As for this module, I think I’m going to make a V2 later on. This was a very quickly made version of something I had in mind, but I can definitely make a better functioning one! Thanks for the feedback !

1 Like

oh, I didn’t notice you were the creator of that one too , ngl, I tried it yesterday and I couldn’t get it to work, but I just tried porting my system to work with V1 and it works wonderfully!

I’m having an issue though, when transitioning from V1 to V2 I get an error telling me splines can’t have more than 3 points (which I assume requires a path), and when I try to use paths instead I get an error telling me i’m trying to use the Calculate functions from a table.

Do you think you could add the same examples from V1 updated to work with V2? I don’t think I fully understood how to use the paths and splines together.

1 Like

Of course, I’ll do that soon! I’m not sure what the problem could be as of right now, but I will look into that. I think a tutorial for how to use V2 is necessary, I just haven’t gotten to it yet ;-;

For now, if V1 works better for you, I suggest using V1. It should work the same as V2, but a little less efficient and more prone to errors. V2 has multiple modules and is more organized, but I haven’t fully documented. I’ll get to that ASAP!

1 Like