How to create a bending cylinder

An example of this is from Elemental Battlegrounds, for example the Holobeam attack.

The white cylinder as it bends is what I am looking for in the GIF.

I tried looking for resources across dev forums, Google, and YouTube for this but I didn’t find it and mostly it related to building rather than scripting.

I wanted to know the math/code/idea behind something like this.

This is a good question.

Although it hasn’t been released yet, I guess you can try Mesh Deformation or alternatively just using meshes altogether, but honestly I have no idea how they accomplished this either and I’m just producing educated guesses.

It uses cylinders as segments of the whole bending cylinder.

Stuff like this is best understood with pictures, so I drew one real quick with my amazing art skills!
BendingCylinderEx

Essentially you have cylinders and spheres, the cylinders connect between two points and the spheres smooth out any outward bends.

5 Likes

I think they used quadratic Bézier Curves. You can find information on Bézier Curves in that hyper link.

1 Like

Bezier curves is especially advanced to me, would the post alone be able to give me a good idea on how to use the bezier curves in code if I know how it works? I have not learned about it at all until now.

Also, what other examples on Roblox is bezier curves useful in?