I’m working on creating team-based spawn points and I’ve written a new overloaded ChoosePlayerStart() function. The function needs to typecast the input Player parameter to my derived Team Player class.
The code is as follows:
AActor *AMyGameMode::ChoosePlayerStart (AController *Player)
{
ATeamPlayer *TeamPlayer = Cast<ATeamPlayer> Player;
...blah...
The compiler complains about the typecast with "error: address of overloaded function ‘Cast’ does not match required type of ‘ATeamPlayer’ ". ATeamPlayer is derived from ACharacter. What’s wrong?