How is UPhysicsThrusterComponent attached to root?

I was attempting to use the usual method of attaching a component to the root object in my class but the UPhysicsThrusterComponent is no longer accessible via normal pointers. I get the error pointer to incomplete class type is not allowed. I then tried to forward declare and that also didn’t work. I looked up the source code and found this:

I tried the suggested “please use GetThrusterComponent() function instead” and still get the error, so how do I attach a thruster to the vehicle I am building?

Here’s my code:

//header file
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Moto")
		class UPhysicsThrusterComponent* Thruster;

//source file

	Thruster = CreateDefaultSubobject<UPhysicsThrusterComponent>(TEXT(""));
	// NO WORKIE
	Thruster->AttachTo(Moto);
	// ASLO NO WORKIE
	Thruster->GetThrusterComponent();

	//WHAT DO I DO NOW?????

did you try this?

found this in release notes:
•PhysicsThrusterComponent.h is no longer included by default in Engine.h

so my solution was to add: #include “PhysicsEngine/PhysicsThrusterComponent.h”

Doing the following works fine in 4.12.5:

  1. Include the header file …

    #include “PhysicsEngine/PhysicsThrusterComponent.h”

  1. Use instead of AttachTo …

    Thruster->SetupAttachment(Moto);