Wingflex on Planes / Flexible Parts

Can you make any possible way of an example?

When you connect two things with a RigidConstraint, the two Attachments involved will be moved so that they have the same orientation. By changing the CFrame (which is local to the parent BasePart) of one Attachment or the other, you can create animations. Try making a rigid constraint and doing this:

while task.wait() do
    RigidConstraint.Attachment0.CFrame = CFrame.fromAxisAngle(Vector3.xAxis, tick())
end

How should i name the parts for the example, how should i do it?

You can name the parts anything you want. As for the amount of bend, it should be based on the stiffness of the wing at that joint and the amount of lift. You can calculate the lift based on acceleration and weight, and you can get acceleration by comparing velocity between two points in time.

I cannot connect the attachments to the part.

I will give you an example in a second

1 Like

WingBend.rbxl (39.7 KB)

Nice. Does it work with more than just 5 parts?

You can add more parts you just have to change the number of parts listed at the top of the script. They also have to be named as expected, so like Wing1, Wing2, Wing3, up to the number given.

Okay last question: How would you do that on a real airplane winglet like a mesh?

You’d use bones but I haven’t really had a chance to use those yet.

I would recommend researching Mesh Deformers: Introduction to Cage Mesh Deformation | Roblox Studio - YouTube. I personally have not seen Wingflex but I believe you could achieve the desired result.

Can you tween the deformation?

Ok I took some time to figure out how bones work and its kind of a pain. Heres basically what you want:
WingBend.rbxl (46.1 KB)

I had to use these to figure out how to export / import skinned rigs correctly:

Bones work basically like attachments but you have to do any weighting in your modeling software. if you don’t know what this is I highly recommend you just show this example to an artist and have them do it for you. Here is the model:
wing.blend (887.8 KB)

1 Like

Wow, but how did you do it, no RigidConstraints?

I modeled and rigged in blender basically the same as you would for any game engine, except I followed some rules in the second link for how to export at the right size. When you import you have to use the plugin from the first link even though its not a character shape, and then choose the fourth option for non-humanoid rigs. The animation works exactly like the rigidconstraint version where it just sets each bone to the same angle.

Is it possible in the studio file you linked that it goes down a randomly generated amount?

For example one time it goes down 5 studs, then the next it goes down 3 studs.

It should always alternate up and down the same amount. Also its run in a client script so it might not work if you try to view it from the server.

1 Like

Why does it always have to stay the same up and down? Also I was not trying to view it from the server.

It doesn’t have to, thats just how its set up.

1 Like