Dear Friends at Epic,
In this thread I am discussing 1 particular function:
Actor.h
UFUNCTION(BlueprintCallable, meta=(FriendlyName = "AttachActorToActor", AttachLocationType="KeepRelativeOffset"), Category="Transform|Actor")
void AttachRootComponentToActor(AActor* InParentActor, FName InSocketName = NAME_None, EAttachLocation::Type AttachLocationType = EAttachLocation::KeepRelativeOffset);
#Repro
I did the following
- Had a rotating looping skeletal Mesh with sockets moving around in circle constantly
- Dragged this skeletal mesh into the level as a skeletal mesh actor (not a character)
- Had a SMA in the level already
- In level blueprint, did a snaptoTarget AttachActorToActor to make the SMA follow one of the sockets of the skeletal mesh
#Rotating Skeletal Mesh FBX For You on DropBox
Here’s my exact asset on dropbox if you wish to use it for testing.
The only socket/bone I’ve tested with is Top
NathanLyer/AnimatedPlatformCircularFlying.FBX
Enjoy!
#No Socket Relative Scaling
The relative socket scale for the socket that the SMA is getting attached to is 1,1,1, no scaling at all
#My Results in Current Build
Because my original skeletal mesh was pretty small from 3ds max, I needed to massively resize it in the level, about 10 times bigger, still only 1/3 of what was really needed
The bigger I made the skeletal mesh actor, then when I played the level, the smaller the attached actor became.
This resulted in me having to make the original SMA HUGE just so it would not get scaled down too small to stand on.
so I am noticing an inverse scaling of the attached actor to the scaling of the Skeletal Mesh Actor
Here’s the size I made the mesh in Editor, so it would not scale down to invisible in PIE
Here’s the scaling that occurred automatically in PIE
Here’s my level Blueprint
#Multiplayer, Very Different Scaling
Then I took the exact same setup, did not change the level at all
and Ran my usual server / client instance as a listen server and a client
#Server,
the SMA became really really small, smaller than PIE, and any other previously seen size
#Client,
the SMA did not become as small as in PIE, it maintained original size of the editor
#None of This Scaling Happens via C++ When Done to a Character
When I run this function via C++ NO SCALING OCCURS AT ALL
but I am doing the function on a Character’s Mesh, not a skeletal mesh actor
#What is All This Weird Non-Replicating Scaling?
I’ve never seen this before, it never happened with all of my tests in C++ with a character as basically a wrapper for the rotating skeletal mesh
I embarked upon these tests because of this thread:
https://rocket.unrealengine.com/questions/7844/creating-complex-rotating-skeletal-mesh-platform-r.html
Rama