Hi,
I’ve been trying to design some system for a project I am working on. Spaceships.
I came across this question multiple times:
Why isn’t it possible to instantiate Actors as “Components” without having to go by a predefined “Child actor” that only gets a special type of actor as child.
Here is how my system was built as I was trying to achieve my goal:
Ship [Pawn]
- BaseNose [Actor]
- BaseTail [Actor]
- Base Wings [Actor]
In fact. The BaseNose was, for example, setting up the common behavior of the nose part of the ship. Pretty empty, to be used as a model.
Then there were my Nose1, Nose2, Nose3 that were childs of BaseNose.
There were the specific meshes and behavior of those specific noses.
The problem came in when I tried to swap the different parts.
The problem appeared when I tried to swap the noses.
In fact, it’s impossible to instantiate it on runtime. Or swap it.
I was wondering why It would not be possible to have the actor as simply a child of another actor.
This would make it’s “root” to be placed relatively the mesh/actor/component it’s attached to.
On an event side. It would just be something like “Enabling input” for the actor using the pawn controller.
Wouldn’t it make sense to be able to add any actor as child of another one ?
At the moment, the “Child actor” component is a real problem as it does not allow to define the “Editable” values for that defined child actor.
Also. On a programming standpoint, We could definitely “swap” the part by any other actor deriving from the one used there as childs of this class could only have more function but cannot “delete” a function of it’s parent… (overriding would be ok, it would modify the behavior but would retain the call intact as long as the parameters are all of the same type)
It’s kind of the same as selecting the mesh for a skeletal mesh or static mesh.
I apologize if the question might seem rude. I’ve just been intrigued by the current way this system is working as it’s not friendly at all. Forcing to set up every editable variable within graphs (killing the interest of editable vars there)…
It’s also making “part swapping” really hard and not helping the building of modular setups.
Well. I am open to every workaround and to listen to any other way to achieve this kind of thing. But it’s not as if we could do something like “childactor->setClass(classThatIsChildOfTheClassInTheComponentTab)”…
Thanks for reading.
Tell me if this is for some “future” release or if the system is not intended to change.
Erio