Hi, this is not really a help request, it’s more like a help for others who may run into the same problem.
I’m following lecture 108 - Trigger Volume of the Unreal C++ course (I’m using version 4.25 of the engine). I followed the instructions and for some weird reason I’m unable to link my TriggerBox
to the door component. Here’s a screenshot of the situation:
As you can see, the code is ok and still I can’t select anything. I did a bit of research and discovered that ATriggerVolume
is not in the class hierarchy of ATriggerBox
(the object we dropped into the scene) - maybe only in the last version of the engine. So obviously the editor doesn’t list the pressure plate in the drop down menu.
I solved this by redefining the pointer as a ATriggerBase
pointer (highest class in the hierarchy before AActor
) and it worked. So I suggest to the creators of the course to warn about this with a little edit or note.
PS: I know I’m a psychotic optimizer and this course is aimed also to people who aren’t familiar with C++, but instead of including the header for ATriggerBase
/ATriggerVolume
, it would be more efficient to declare class ATriggerBase;
or class ATriggerVolume;
at the very beginning since, as we are using only a pointer in the header, the compiler doesn’t need all the info about those classes. This seems to not bother the engine and is a simple way to speed up compilation time.