Rules for child objects and collision

I’m just trying to figure out the rules for having a hierarchy of components that contribute their collision to the overall object hierarchy. I’ve googled…and tried different combinations, and I can’t seem to get this to work.

Imagine building a ship. Players can attach static meshes (which are combined into a procedural mesh) which has collision. Like building blocks.
Or, they can attach more dynamic things (like a turret), which has behavior.

Sounds simple right? But I can’t seem to get this to work.

Basically, there are three things I need these things to do:

  1. Be “attached” or welded to the root transform, and base their local transform off the root transform. If the root transform is rotated, all child objects rotate with it. As you would expect.
  2. Not have their own separate physics behavior, move independently of the parent transform. They cannot act as if unattached, or unwelded.
  3. Be able to be an actor which has independent behavior, but still stay attached and contribute to overall collision of the entire body.

I would like to have one or more procedural meshes for building blocks, and the more dynamic objects be child actors.
Is this something Unreal just can’t do?

I’ve tried having a static mesh at the root, which works for child static meshes but actors and procedural meshes don’t work properly. Procedural meshes act unwelded (but collision works as I would expect). Child actors are welded, but no collision.

Been beating my brains out on this for several days. Can anyone offer any assistance or direction on how to accomplish what I need?

Probably need to specify I’m using blueprints.

have you tried the attach actor to actor node?

Yes, the actor welds but doesn’t contribute to collision.

Hello, Strombonni,

What if you kept track of the actors that you created on the top-level blueprint, and then added a box collision component corresponding to each of them, on spawn, that would be updated every tick with the transform of the child actors? That way you would have many “dummy” collision components that would all contribute to the collisions of your main object. You could use separate collision channels to avoid hits with the actual child actors. Would that help?

Thanks Diego I think that would work for actors which don’t seem to contribute to Collision. Basically it’s like a substitute however I still can’t seem to get procedural mehes to weld. If I could get procedural meshes to weld and have collision, I could just weld the actors without collision and let the procedural messag handle collision.
Just knowing the rules or actual behavior would be useful. One of my biggest frustrations is unreals lack of documentation. It’s used up a lot of time I could have spent actually moving forward.

Oh, and the reason I need procedural meshes is the just adding individual building block actors has shown to be very bad for performance, I could use several thousand of them. Procedural meshes would allow me to combine them into groups

Does anyone know if this is even doable in C++? Is it an engine limitation, do I need to put child actors, components, static meshes, or procedural meshes in some arcane order? Maybe go get some chicken bones and dice?

Having the same issue - my game relies on attached actors on the parent and trying to figure out how to keep them welded while keeping collision seems really confusing. I have attempted to dig around on the internet and it does seem possible to edit in C++ and have additional collision volumes on the pawn. Another idea is to possibly have some overlap events in place that repels the parent although getting my head around making that act as well as intended seems tricky.
Spawning little collisions for each part could be a thing…

If anyone has a good solution for this it would be much appreciated!

Necro.
@Strombonni A few years later, no doubt many more experiences. Any thoughts on this question from 2018? (@mothergoose as well)

1 Like