Relative Content

Tag Archive for c++unreal-engine4unreal-engine5

Need help understanding pointers and dereferencing, in this code

{ Super::BeginPlay(); FString Name = GetOwner()->GetActorNameOrLabel(); FVector Location = GetOwner()->GetActorLocation(); UE_LOG(LogTemp, Warning, TEXT(“Mover Owner: %s”), *Name); UE_LOG(LogTemp, Warning, TEXT(“Actor Location: %s”), *Location.ToCompactString()); } In this code, I understand why * was placed after AActor, but I don’t understand why it wasn’t placed after the FVector and FString, as they are also pointers. and how can […]

Need help understanding pointers and dereferencing, in this code

{ Super::BeginPlay(); FString Name = GetOwner()->GetActorNameOrLabel(); FVector Location = GetOwner()->GetActorLocation(); UE_LOG(LogTemp, Warning, TEXT(“Mover Owner: %s”), *Name); UE_LOG(LogTemp, Warning, TEXT(“Actor Location: %s”), *Location.ToCompactString()); } In this code, I understand why * was placed after AActor, but I don’t understand why it wasn’t placed after the FVector and FString, as they are also pointers. and how can […]

SetControlRotation doesnt work for some reason

APlayerController* controller = UGameplayStatics::GetPlayerController(this->GetWorld(), 0); FRotator Rotation = Controller->GetControlRotation(); Controller->SetControlRotation(Rotation.Pitch + amount*5, Rotation.Yaw, Rotation.Roll); error C2660, function doesnt accept 3 arguments c++ unreal-engine4 unreal-engine5