Lag when attaching actor to component
I'm experiencing lag/jitter when attaching anything to a socket of a skeletal mesh.
Specifically, I have a static mesh and a skeletal mesh and I'm trying to connect the static mesh to a leaf joint socket of a skeletal mesh. On doing so, the static mesh seems to lag behind the movement of the skeletal mesh. The skeletal mesh has physics applied to it and is essentially a rag doll.
I have connected the 2 using Attach to Actor, Attach to Component and even sampling the skeletal mesh socket translation and applying to attachment on Tick.
It is almost as if the attachment only gets a translation every other frame.
I wonder if this is is rooted in to the physics engine for performance reasons?
Background behind what I'm doing: I'm trying to attach a hair mesh to a humans head. The hair and the body have to be separate.
Any help anyone can give would be greatly received.
asked Apr 24 '15 at 03:43 PM in Blueprint Scripting
I just used constraints instead of Blueprint Attach to * nodes.
In web developer terms, it seems a constraint can be likened to animating with CSS, where as Attach to * can be likened to animating with JS
answered Apr 24 '15 at 05:08 PM
In case there's anyone else having a similar issue, I found an alternate (C++) way of solving this problem that lets you keep the standard workflow of attaching meshes to sockets of skeletal meshes.
Call the below code in the Tick() function of the parent on the attached child mesh:
Not sure about the impact on performance, but this will force the transform to update earlier than it would normally and prevent jittering/attach update lag.
answered Sep 02 '18 at 04:58 PM
I had a similar issue where my socket attachments for a skeletal mesh were delayed for 1-2 frames. It was easy to observe using console command: t.MaxFPS 10
In my case, it was not a fix but mostly a work around. I had "Simulate Physics" which was ON, on the parent skeletal mesh, while I didn't need it . Turning it off removed this delay.
Follow this question
Once you sign in you will be able to subscribe for any updates here