Announcement

Collapse
No announcement yet.

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

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    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:


    Code:
    // 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

    Code:
    // 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();
    }

    #2
    Add

    Code:
    #include "Engine/CollisionQueryParams.h"
    Also Intellisense is trash. Consider using Visual Assist instead.
    Able Ability System - A high performance, robust ability system for UE4. Now Available!

    Comment

    Working...
    X