Spawning a projectile

The templates are helpful for this kind of thing. I just opened the FirstPerson C++ project template to get their spawning logic for you here.

Ultimately what you need to do to spawn a actor is the following:

GetWorld()->SpawnActor<ActorType>(UClass* class, FVector* SpawnLocation, FVector* SpawnRotation);