Problem with Static Mesh Component tick

Hey,

i want a static mesh component (which is attached to a static mesh actor as his root component) to tick. I am creating just a big box and made it simulate physics and changed the bCanEverTick in the actor and the component to true. i have no idea why but the TickComponent function just not called. is there anything else i need to do?

#Answer

Try adding this to your constructor!

bAutoActivate 							= true;
PrimaryComponentTick.bCanEverTick 	= true;
PrimaryComponentTick.TickGroup 		= TG_PrePhysics;

(also if you are ticking it you probably always want to make sure it is set to movable (just wild guess here))

I’ve spent more time debugging the lack of setting static mesh comp to movable than anything else related to static meshes :slight_smile:

//Move-able!
StaticMeshComponent->SetMobility(EComponentMobility::Movable);

thanks it helped!