Getting child component from actor

Ok so, it’s not a matter of public/private (C++ doesn’t have public/private classes), it’s the fact that ADoorTrigger isn’t defined in the .cpp you’re trying to use it in, what you need to do is #include “DoorTrigger.h” in the .cpp file that is using the Cast<>() so that it knows what an ADoorTrigger class is. Each .cpp file is compiled separately and only knows about the classes that you #include (and basic classes that MSVC and UE4 always include). This is a basic C++ thing, so you should probably go through some tutorials to get a better understanding, otherwise you’ll run into a lot more problems down the road.