Announcement

Collapse
No announcement yet.

How do i scale root without affecting child component's

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How do i scale root without affecting child component's

    I have a static mesh (root) and a sphere component attached. I would like to scale the mesh (root) without
    the sphere component being affected. I have tried **SnapToTargetNotIncludingScale** but it doesn't seem to ignore scale.

    #2
    Here is my solution for anyone else,

    Code:
    void AActor::OnConstruction(const FTransform& Transform)
    {
    	Super::OnConstruction(Transform);
    
    	SphereComp->SetWorldScale3D(FVector(1, 1, 1));
    }

    Comment


      #3
      Hi. I think the simplest way of doing this is to use (few years later)
      SphereComp->SetAbsolute(/location false,/rotation false, /scale true). It sets that the sphere should inherit not from the parent but from the world.

      Comment

      Working...
      X