I’m trying to make Actors that have multiple static mesh components, but the problem is that collision goes a bit funny: specifically, only the root actor will have any collision detection. Once attached sub-components / actors don’t detect collisions at all!? I’ve tried multiple techniques: attaching separate actors, dyn gen static mesh components, static mesh components w/ mesh populated dynamically, every possible combination of collision settings… Essentially I want to attach multiple SMs / Actors to another parent Actor, and only set the mesh at runtime, but have that sub-component detect collisions.
I have tested this internally and with 4.7.1, if I manually (i.e. not via construction script or dynamically) create multiple static mesh components, either attached to a scene component root or not, I can collide with all of the static mesh components.
What ‘collision detection’ are you expecting? Are you wanting to attach multiple static mesh components to a character perhaps? If so then this is not supported for the moment, we do not perform collision sweeps sub-components when detecting collisions with characters.
Ah ok. two things I didn’t do:
I’ve not been selecting manual attachment, but rather (using function “create new static mesh component”) leaving manual attachment unchecked; and I’m still using 4.6 - downloaded latest release, so I’ll play with this in 4.7 tonight
Just out of curiosity, what does manual attachment do, that auto-attachment doesn’t?
When you say “not via construction script or dynamically”. I would have described what I’m doing as dynamic: I take the mesh information and somehowTM assemble a unique base weapon type. So, I have an “empty” base weapon class (either no or empty SM components) , which takes some in data at construction, this tells it what meshes to use for various parts. It then feeds these meshes dynamically into either pre-existing SMC, or creating and attaching a new SMC in method 2. I’ve also tried to this off the construction script - what is the problem with doing it here (and could doing it off On Begin Play solve it)?