Sorry, I forgot to add the cast. So try this:
EActor = Cast<AEnemyActor>(HitResults->GetActor());
So GetActor returns an AActor * and we have to cast it to an AEnemyActor, using the Cast method.
Sorry, I forgot to add the cast. So try this:
EActor = Cast<AEnemyActor>(HitResults->GetActor());
So GetActor returns an AActor * and we have to cast it to an AEnemyActor, using the Cast method.