I have a problem with a Triggervolume i created in the editor and that makes me some trouble in C++.
In more detail:
I created the TriggerVolume in the editor and wanted to create a simple pointer like
ATriggerVolume* MyTrigger;
in Code, but VS did not accept it as valid code and intelliSense isnt suggesting it too. I tried it in a simple class directly inheriting from AActor and in one class inheriting form UActorComponent.
The odd thing is, that I saw it working in a very simple Tutorial like this and that i have another project with nearly the same classes inheriting from AActor and UActorComponent which accept ATriggerVolume.
The problem seems so basic, but i couldnt solve it until now. Can someone please help or guide me into the right direction.
Thank very much!
A_nde
I’m not sure what tutorial you’re referring to however for a class inheriting from actor, you should be able to use a UBoxComponent* in place of a trigger volume. If you setup the box component, you can add code or set it up in blueprints to respond to overlap events as a trigger volume would.
Hi ,
Thanks for your answer. I know there are alternatives to TriggerVolume, it just bugs me that i cant find a way to make it working. Ben Tristem did it in his course by the way.
Cheers ande
I can confirm changing “CoreMinimum.h” to “Engine.h” solves it for me. It appears that since version 4.17 they have sped up the compiling process by reducing the amount of header information stored in .h files. Unfortunately it appears the user has to learn which .h files to use or replace for necessary functions to work.
Does anyone know a way to force all new classes I create to automatically include certain headers? Such as “Engine.h” or other necessary .h files? If you do, please email me at eldridge.felder@gmail.com