This seems suspiciously similar to parts of what was reported in https://answers.unrealengine.com/questions/232013/collision-and-child-actor.html and https://answers.unrealengine.com/questions/248957/attachto-not-working-on-uspherecomponent.html – especially the latter.
The boil-down of it is that if I create a (moveable) static mesh actor BP that has physics enabled, and then try to use it by calling AddChildActorComponent + AttachTo targeting the scene default root, the AttachTo appears to completely ignore(?) its transform handling option, and treat it as if it were “keep world position”.
Steps to reproduce:
- Create a BP extending StaticMeshActor
- Set the BP defaults to be movable, enable physics, and set the collision presents accordingly
- Add a tick event handler that applies a physics force (torque is the main one I’ve tried at this point)
- Create a BP extending Pawn
- Add an event handler for play begin
- To that event handler, add an AddChildActorComponent node set for manual attachment and a non-zero transform vector
- Then add a node which attempts to attach that component to the scene default component, set to keep relative transform
- Place an instance of the pawn BP into a level at some position other than the origin, and hit play
Expected result: the pawn should spawn into the level, with the static mesh BP offset from the pawn origin by the transform vector specified in step 6, in all cases
- If the static mesh actor BP has physics disabled, it is spawned in the correct location
- If the static mesh actor BP has physics enabled, it is spawned at that offset from the world origin, rather than the pawn’s origin
I have a sample project that demonstrates this in multiple ways, but I wasn’t able to find a good guide for “how to provide an example project sanely” anywhere – if someone can point me at instructions for that, I will attach it.