Download

Scaling in C++

Hey, there!
I have a static mesh created like this:

UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=“Shooting”)
UStaticMeshComponent *Mesh;

And i need to scale this mesh from code, how can i do that?
Maybe there is some function or something there?

use VisibleAnywhere not EditAnywhere. Also make sure its attached to the root component (or is the root component).

Mesh->SetRelativeScale3D(FVector(2, 2, 2));
2 Likes

Thanks, found this function yesterday. It works