Cast uses templates so to get it work it needs you to specify class in template arguments (or whatever those are called)
AFirstPersonCharacter* OtherCharacter = Cast<AFirstPersonCharacter>(OtherActor);
Cast uses templates so to get it work it needs you to specify class in template arguments (or whatever those are called)
AFirstPersonCharacter* OtherCharacter = Cast<AFirstPersonCharacter>(OtherActor);