I’m trying to build a basic plane dogfight game in c++. Its a 3D game.
I’m trying the whole vector math thing using GetWorld()->GetFirstPlayerController()->GetPawn()->GetActorLocation(); and then this->GetActorLocation to try and calculate the angle between the Player Controlled Pawn and the Enemy planes so that I can rotate the Enemy Planes toward the Player Pawn at spawning. But I have failed.
Does anyone know of any decent tutorials on the subject?
Also if my Player Controlled Pawn is facing directly east at spawning - do I really want to be calculating angles between locations of the Player Pawn and the Enemy planes? Or is it the forward vectors that i’m after?