# Setting Scale Transforms with SetActorTransform, Only Scale3D is not Replicating

**URL:** <https://forums.unrealengine.com/t/setting-scale-transforms-with-setactortransform-only-scale3d-is-not-replicating/275434>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [March 11, 2014, 2:20am UTC](https://forums.unrealengine.com/t/setting-scale-transforms-with-setactortransform-only-scale3d-is-not-replicating/275434 "2014-03-11T02:20:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 2:20am UTC](https://forums.unrealengine.com/t/setting-scale-transforms-with-setactortransform-only-scale3d-is-not-replicating/275434/1 "2014-03-11T02:20:03Z")

</div>

![objectscalingreplication.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/5/b/e5b17b15e76105fd7b9286548715e449b8d003f1.jpeg)

**In the pic above I used the same single function to set the rotation, the scaling, and the location** using FTransform, but the scaling alone is not replicating (using the single server function). **Location and Rotation replicated just fine.**

* * *

Dear Friends at Epic,

I am using a single function to handle rotation, location, and scaling of in-game objects in my in-game multiplayer editor.

Location and Rotation are replicating flawlessly via the function below

Scaling is not replicating

**I dont know why just scaling would not be working** using the exact same function which is using an FTransform.

Any ideas?

Thanks!

.h

```
//Server Transform
UFUNCTION(reliable, server)
void SERVER_TransformSMA(FTransform VictoryTransform, AStaticMeshActor * VSMA = NULL);

```

.cpp

```
void AVictoryPower::SERVER_TransformSMA_Implementation(
	FTransform VictoryTransform, 
	AStaticMeshActor* VSMA
){
	
	//Using this setup rotation and movement replicate just fine
	//scaling does not
	
	if (!VSMA) return;
	// ~~~~~~~~~~~~~
	
	VSMA->SetActorTransform(VictoryTransform);
	
}	

```

**calling the function using mouse delta to cause uniform scaling**

```
SelectedActorTransform = VictoryPC->SelectedActor->GetTransform();

	if (VictoryPC->IsInputKeyDown(EKeys::A))
	{
	//ALT - Scaling
	if (VictoryPC->PlayerInput->IsAltPressed())
	{
		RV_Vect = UnitVector;
		
		//use mouse x or mouse y
		if (FMath::Abs(VictoryPC->MouseDeltaX) > FMath::Abs(VictoryPC->MouseDeltaY))
			RV_Vect *= 1 + VictoryPC->MouseDeltaX * ShiftedMult;
		else RV_Vect *= 1 + VictoryPC->MouseDeltaY * ShiftedMult;
		
		//Multiply Scale 3D
		SelectedActorTransform.MultiplyScale3D(RV_Vect);
		
		//Server Transform
		SERVER_TransformSMA(
			SelectedActorTransform, 
			VictoryPC->SelectedSMA
		);
		return;
	}	
}

```

🙂

Rama

---

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 2:20am UTC](https://forums.unrealengine.com/t/setting-scale-transforms-with-setactortransform-only-scale3d-is-not-replicating/275434/2 "2014-03-11T02:20:04Z")

</div>

#Update

I did the workaround of actually manually replicating just the scale component of the FTransform

but it’d be lovely if **SetActorTransformation** would replicate the scaling for me 🙂

```
//Rep Scaling Only - Temp Fix
SERVER_SetScale(
	FVector_NetQuantize100(SelectedActorTransform.GetScale3D()),
	VictoryPC->SelectedSMA
);

```

//temp fix

```
void AJoySMA::OnRep_SetScale3D()
{
	SetActorRelativeScale3D(ClientOnlyScale3D);
}

```

 ![manualrep.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/f/c/efce8e934df5c40f1eacc91d6d46edc89bab713b.jpeg)

---

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 2:20am UTC](https://forums.unrealengine.com/t/setting-scale-transforms-with-setactortransform-only-scale3d-is-not-replicating/275434/3 "2014-03-11T02:20:05Z")

</div>

Your analysis is correct; scaling does not replicate by default in UE4. We may look at adding this but until then, you are best to manually replicate it.

---

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 2:20am UTC](https://forums.unrealengine.com/t/setting-scale-transforms-with-setactortransform-only-scale3d-is-not-replicating/275434/4 "2014-03-11T02:20:05Z")

</div>

okay, thanks Dave!

My current setup is working very smoothly so it’s all good 🙂

Great to hear from you!

Rama

---

<div class="post-metadata">

**Author:** ![afuzzyllama](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@afuzzyllama](https://forums.unrealengine.com/u/afuzzyllama)\
**Post date:** [April 30, 2014, 4:57pm UTC](https://forums.unrealengine.com/t/setting-scale-transforms-with-setactortransform-only-scale3d-is-not-replicating/275434/5 "2014-04-30T16:57:46Z")

</div>

I’m running into this exact problem. Would be cool if this is someday implemented 🙂
