This seems suspiciously similar to parts of what was reported in Collision and child actor - World Creation - Epic Developer Community Forums and AttachTo not working on USphereComponent - Programming & Scripting - Epic Developer Community Forums – especially latter.
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 scene default root, 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 BP defaults to be movable, enable physics, and set collision presents accordingly
- Add a tick event handler that applies a physics force (torque is 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 scene default component, set to keep relative transform
- Place an instance of pawn BP into a level at some position other than origin, and hit play
Expected result: pawn should spawn into level, with static mesh BP offset from pawn origin by transform vector specified in step 6, in all cases
Actual result:
- If static mesh actor BP has physics disabled, it is spawned in correct location
- If static mesh actor BP has physics enabled, it is spawned at that offset from world origin, rather than 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.