ComponentToGrab: pointer to incomplete class type is not allowed

it still works… but…
I have some errors here, on the “GrabComponentAtLocationWithRotation” function (third and fourth parameters), the thing is it shows this “error” on ComponentToGrab even if i declared as a UPrimitiveComponent.

if (ActorHit)
	{
		PhysicsHandle->GrabComponentAtLocationWithRotation(
			ComponentToGrab,
			NAME_None,
			ComponentToGrab->GetOwner()->GetActorLocation(),
			ComponentToGrab->GetOwner()->GetActorRotation());
	}

Error (active) E0393 pointer to incomplete class type is not allowed BuildingEscape e:\Documents\Unreal Projects\Udemy\Udemy_Section_03\BuildingEscape\Source\BuildingEscape\Grabber.cpp 99

i’m working on UE 4.18.3

any sugestion?

2 Likes

It works for me on UE 4.19.1:
#include “Components/PrimitiveComponent.h”

7 Likes

^^ Totes Works^^
Knew it was a header just couldn’t find the UE4 docs. Thanks Ben.

Thanks!! it works perfectly

Privacy & Terms