Download

Getting <Errortype> (but no compilation errors) on CollisionQueryParamswhen trying to use them.

See code below, I get the following warning/error on trying to use FCollisionObjectQueryParams and it stops Intellisense from working.

The error appears as “<Error-type> APECCPlayerController::ObjectQueryParams” when mousing over the variable name.

My code is below:


// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/PlayerController.h"
#include "PECCPlayerController.generated.h"

struct FCollisionObjectQueryParams;
struct FCollisionQueryParams;


UCLASS()
class PECC_API APECCPlayerController : public APlayerController
{
    GENERATED_BODY()

protected:

    APawn* ControlledPawn;
    ACharacter* CastPawn;

    FCollisionQueryParams LineTraceParams;
    FCollisionObjectQueryParams ObjectQueryParams;
    FVector LineTraceStart;
    FVector LineTraceEnd;
    FHitResult HitActor;



    virtual void BeginPlay() override;
    virtual void Tick(float DeltaTime) override;
    virtual void SetupInputComponent() override;

    void PossessPawn();

public:
    APECCPlayerController();

    UPROPERTY(EditDefaultsOnly, Category = "GamePlay")
        float PossessionRange = 250.f;


};


CPP


// Fill out your copyright notice in the Description page of Project Settings.

#include "Public/PECCPlayerController.h"
#include "Public/CollisionQueryParams.h"
#include "PECCCharacter.h"
#include "Gameframework/Pawn.h"
#include "CollisionQueryParams.h"
#include "DrawDebugHelpers.h"
#include "Kismet/GameplayStatics.h"
#include "Engine/World.h"

APECCPlayerController::APECCPlayerController()
{
    ObjectQueryParams.AddObjectTypesToQuery();
}


Add



#include "Engine/CollisionQueryParams.h"


Also Intellisense is trash. Consider using Visual Assist instead.