For some reason the SetActorLocation method will not work on my Pawn

I thought it was because I was I was using a Sphere, but I tried to use a Static Mesh and it didn’t work. I know that the value I put in is changing because I have it displayed in my HUD it just sits at 0, 0 .

Check that you have attached your components to root/each other.

1 Like

I did these in the code and rebuilt my Blueprint
header:

UPROPERTY(EditAnywhere, BluePrintReadWrite)
		UStaticMeshComponent* mesh;

	UPROPERTY()
		USceneComponent* root;

source

mesh = CreateDefaultSubobject<UStaticMeshComponent>("mesh");
	root = CreateDefaultSubobject<USceneComponent>(TEXT("root"));
	RootComponent = root;
	mesh->AttachTo(root);

You don’t mention if it is still a problem, however if it is you can try this:

SetRootComponent(root);
mesh->AttachToComponent(root, FAttachmentTransformRules::KeepRelativeTransform);

Actually I found the problem it was the wrong scale. I had my code measured for meters when I should have used centimeters.