[Request] Easy Way to Set Absolute Scale 3D for Actor

Dear Friends at Epic,

I am not aware of any easy way to Set Absolute Scale for an Actor.

while I found a way that works, it is not exactly convenient or accessible for those new to UE4.

Additionally, Scale still does not replicate, I have to set it separately when using a FTransform.

Here’s my code for reference:

//RepSetScale is FVectorNetQuanitize100 for the rep var for OnRep_SetScale()
void AVictoryPlayerCharacterBase::OnRep_SetScale()
{
	//NEED TO SET ABSOLUTE SCALE NOT RELATIVE
	//SetActorRelativeScale3D(RepSetScale);
	
	//HOW TO SET ABSOLUTE SCALE 3D
	FTransform CurTrans = GetTransform();
	CurTrans.SetScale3D(RepSetScale);
    SetActorTransform(CurTrans);
}

#:heart:

Rama

All scale is usually relative and it’s unusual for scale to be needed to replicate over a network, so I don’t think this wants to happen as a default, it seems specific to your particular use case :slight_smile:

You can indeed set it directly with a transform though, including via Blueprint, so it’s not too hard to implement if a user needs it!

Not everyone has as many years of experience with unreal engine as you do Luke!


I’m not convinced that newcomers to the engine will quickly realize the difference and how to set Relative vs. Absolute scale, I am looking to improve this

adding Actor::SetAbsoluteScale3D() would go a long way toward clarifying the fact that there is a difference and providing easy way to do it.

:slight_smile:

Rama

I’m adding SetActorScale3D to go with SetActorLocation/Rotation which also set in world space.

Woohoo!

Thanks James!

:slight_smile:

Rama