So in some games like Horizon Airways i’ve seen Wingflex, flexible wings on planes, i couldnt believe it. I tried to find out how to do it, but there arent any videos on YouTube about it.
Here’s what i found out:
A bunch of joints
HingeConstraints
SpringConstraints
How do you make flexible parts, or wingflex on airplane wings?
I think its very complicated but possible, so how?
I would advise against using springs or hinges, since theres no actual aerodynamic force to push these. You can use RigidConstraints or Welds (old school, not WeldConstraint, which has problems when used in a running game) to create a bunch of bend points and then animate these. You could probably also use an Animator to do this very efficiently but I’m not familiar with how those work.
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
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.
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.
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)
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.