I’m a senior GPP and I’m new at UE4, transferring from a proprietary engines and Unity.
I’ve dabbled with blueprints nodal editor for a bit and now I’m trying to dive into the C++ implementation by doing simple components that I’ve done on past projects…
One of these is a teleport component: upon any actor entering its associated CollisionComponent, it gets teleported to a specific Actor position/oriented defined by Level Designers.
The first part is covered by the Class Creation - C++ Only documentation, but the second part has been tricky because I don’t understand how to add a variable to my Actor Component class that would allow a designer to pick another actor in the scene as the teleporting ending point.
I was thinking to reference an actor or its SceneComponent, so I’ve searched around a bit and it seemed that FComponentReference would be the solution. However, in the editor, the associated picker cannot pick an object of the scene and if I drag an actor over its ‘Other Actor’ field, the ‘invalid’ red outline appears.
Do you have any suggestion?
Thanks a lot in advance