Hey there,
I am at my wit’s end when it comes to this problem. I have searched everywhere and cannot get a proper solution.
I have a custom Scene Component (and an Actor Component; I have tried both) which I would like to do the following in-editor:
Within the component I need the ability to create a collection of Box Components, each box component would be attached to a bone or socket of a character which the scene/actor component is attached to. On each of these boxes I would like to be able to change their size and relative position as they sit on the character bone/socket.
Each box component is iterated upon by the parent scene/actor component, which then handles some custom collision code I wrote.
My problem is this:
When using a scene component as the parent component I am unable to access the owning AActor from within the editor when I call GetOwner(). It is always empty, so is the GetAttachParent(), GetAttachSocketNam(), GetParentComponents()… everything is just empty until, I assume, the game actually runs. I need these properties in the editor if I am going to configure my custom components efficiently.
When using an Actor Component things are a little better. I am able to create and attach box components to the parent actor’s bones and sockets, but as soon as I do so the variable to the box component within the details panel shows as empty. Even though the pointer to that box component is still valid, I can see the box component rendered in the viewport, and I can change some of the properties programmatically, I am unable to do so in the editor itself. So now I can create these boxes but cannot modify their position or scale.
I am at a complete loss as to how to continue this. I looked into writing my own editor module to try and extend the editor functionality, perhaps handle some custom structs, but that won’t help much if these options don’t render properly in a way I can manipulate them in the first place.
Has anyone worked with custom character collision? When I search for this I only come up with static mesh collision questions and walkthroughs, which is not what I need. Or maybe experience handling multiple sub-components spawned from a single scene or actor component within the editor?
Any help is appreciated…