So I’m slowly getting the basics down for the most part, but there’s still stuff that I just don’t understand even after reading… Then reading some more. I’ve got a few questions that I hope someone could help answer better, or explain.
-
-
Could someone please explain to me, where the bulk of the code goes when coding a game? Also where are Namespace and Headers defined at, and also how?
APlayerController* OurPlayerController = UGameplayStatics::GetPlayerController(this, 0);
if (OurPlayerController)
{
if (CameraTwo && (OurPlayerController->GetViewTarget() == CameraOne))
{
//Blend smoothly to camera two.
OurPlayerController->SetViewTargetWithBlend(CameraTwo, SmoothBlendTime);
}
else if (CameraOne)
{
//Cut instantly to camera one.
OurPlayerController->SetViewTarget(CameraOne);
-
-
- Could someone explain this code a little bit better for me please? Step by step, with the syntax and what’s going on. For example I don’t understand this.
APlayerController* OurPlayerController
= UGameplayStatics::GetPlayerController(this,
0);
Correct me if I’m wrong please.
APlayerController OurPlayerController* Here APlayerController is an Actor type, and the Asterisk is pointing to OurPlayerController then equal is to UGameplayStatics but what’s this ::GetPlayerController(this, 0) part mean?
Also if anyone has more tutorials step-by-step, or that explains everything I’d gladly appriciate them.
Thanks!