How to use SceneComponent on StaticMeshActor to make it move?

Hi, everyone.

I loaded default fps scene. There are a lot of boxes(StaticMeshActors). I tried to experiment with components to move them.
I created SceneComponent and added code to TickComponent function:


FVector offset(-10 * DeltaTime, 0, 0);
this->AddLocalOffset(offset);

It does not move. I tried with and without physics. I set SceneComponent to autoActivate.
The same code works for Actor class.

Any advice is appreciated.

Thanks,

I figured it out:


FVector offset(-10 * DeltaTime, 0, 0);
this->GetOwner()->AddActorLocalOffset(offset);

Needed to use GetOwner. I guess my SceneComponent has it’s own transform.