Hey guys so with all the new updates I found that you had to switch from Dans format to
if (ActorHit){
PhysicsHandle->GrabComponentAtLocationWithRotation(
ComponentToGrab,
NAME_None,
ComponentToGrab->GetOwner()->GetActorLocation(),
ComponentToGrab->GetOwner()->GetActorRotation()
);
}
BUT THEN I found that
ComponentToGrab-> Kept getting a red error under it saying -
“Pointer to incomplete class type is not allowed”
I would Build and be able to play just fine in both Unreal and VS But the red lines were really hurting my ocd
SO I found a quick fix that worked perfectly
All you need to do is write it out like this
if (ActorHit) {
if (!PhysicsHandle)
{
return;
}
PhysicsHandle->GrabComponentAtLocationWithRotation(
ComponentToGrab,
NAME_None,
ActorHit->GetActorLocation(),
ActorHit->GetActorRotation()
);
}
Changing ComponentToGrab->GetOwner()->GetActorLocation to simply ActorHit->GetActorLocation(),
Also NOTE that I left the first ComponentToGrab, in because it is still needed.