Hello friends of the code. Relatively new to C++.
Can anyone explain to me exactly what “cast” is good for in C++, using this example or in general?
I am in an actor “weapon”.
APawn* OwnerPawn = Cast<APawn>(GetOwner());
AController* OwnerController = OwnerPawn->GetController();