To be honest, I’m not really sure how to title this ^^
I’m currently trying to setup a Star Wars X-Wing Spaceship in Unreal Engine and that’s what I’m using as an example now. I need a general answer though, because I will have this problem in many other cases too.
Basially, what I try to achieve (but was failing the last few weeks) is:
- Have the X-Wing Actor consist of multiple Skeletal Meshes that make up the whole ship (they have to be skeletal meshes because I want to animate smaller details like the landing gear later). The important meshes for this are the wings and the fuselage (the middle part of the ship).
- Have the ability to open and close (rotate) the wings like in the movies.
- Have the whole ship act as one physics object. (but the collisions of the wings have to rotate together with the meshes, when they ship opens its wings)
The problem here is that I have to let all the meshes act as one physics actor together + the collisions of the wings have to rotate together with the meshes of the wings. I tried different methods but they all didn’t work out. Here are two examples if you want to know:
-
One way was to add Collision Bodies to all Meshes and enable physics for all of them. In the Actor Blueprint i have to connect all the meshes with Physics Constraints and set everything on “Locked” so that the wings stay connected to the fuselage. But even though I did this, the wings were always pushed / lagging behind if they collided with something else. In general, I could not really let all the meshes act as “one ship” because there was always something not working with the collisions of the wings.
-
Another way was to manage all the physics (collisions of the ship) in one Physics Asset of the fuselage and just add all the other meshes with no collision to the Actor later. I added non-weighted bones to the Skeleton of the fuselage that represent all the wings. With these bones I created an Animation Sequence that rotates these bones so that the wings will open. Now I thought that I can add the collisions of each wing to all these bones.
A screenshot so you know what I mean. I only added collision bodies to the two upper wings (bones)
I thought if the animation sequence (to open the wings) is playing, it will rotate the bones with the collision bodies (so the collision bodies are in a new place, where they should belong). But if I add collision bodies to a bone, it has its own physics and is not listening to animations anymore. What I want to achieve is that the bones stay in place, follow the animations and only affect the whole physics asset as one if something collides with them (e.g. something collides with a wing of ship: the whole ship should be affected; the wing should not move out of its place)
I think my explanation sounds a bit confusing but at this point I’m having this “I feel kinda dumb” moment or that I missed something haha … (also sorry for bad english) I hope it’s easier to understand what I want to achieve if you know how an X-Wing in Star Wars works ![]()
In conclusion, I’m looking for a way to have multiple meshes in an Actor Blueprint to act as one Mesh with physics enabled that can also play animations to rotate collision bodies/boxes.
