x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Lag when attaching actor to component

Dear Epic/Community,

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.

Thanks, James

Product Version: Not Selected
Tags:
more ▼

asked Apr 24 '15 at 03:43 PM in Blueprint Scripting

avatar image

MinxiesDev
280 18 26 41

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

Fixed it!

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

more ▼

answered Apr 24 '15 at 05:08 PM

avatar image

MinxiesDev
280 18 26 41

avatar image Staus Jun 24 '15 at 07:55 PM

Please please please, tell me how you made the constaint, i've been messing around with physical constraints for 4 hours now and i'm just out of ideas.. save me ;_;

avatar image MinxiesDev Jun 24 '15 at 08:30 PM

Sure.

You can actually do it all in the GUI.

There's a great tutorial on it here: https://docs.unrealengine.com/latest/INT/Engine/Physics/Constraints/ConstraintsUserGuide/index.html

And/or here: https://docs.unrealengine.com/latest/INT/Engine/Physics/Constraints/ConstraintsBlueprints/index.html

On a side note, I found constraints to have a bit of lag as well!

This happened once the 2 skeletal meshes i was connecting had a lot of bones. Also make sure you don't connect the child too far down the parent's joint hierarchy (as this will make the problem significantly worse)

I ended up connecting my skeletons an meshes in Maya, prior to import.

I would only recommend constraints if you need to attach skeletal mesh actors at runtime (on an optional basis) and both of those objects do not have too many bones.

avatar image Staus Jun 24 '15 at 08:32 PM

Thanks for the quick answer, i will try that out now!

avatar image Staus Jun 24 '15 at 09:14 PM

Nope.. i followed the instructions again and again and again, tried my own combinations, nothing works... :(

avatar image MinxiesDev Jun 24 '15 at 10:40 PM

Did you specify a bone for each skeletal mesh?

You should see a red and a blue (I think those colours are correct) box around each if you have selected the correctly, both with a corresponding line leading back to the constraint.

Also, make sure your objects are selected in the first place. I like to use the eye droplet tool

avatar image Roland_Price Apr 01 '16 at 10:07 AM

Having the same with weapon and IK bones when attaching left hand to it. Any solutions?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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:

 GetWorld()->Scene->UpdatePrimitiveTransform(AttachedChildMesh);

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.

more ▼

answered Sep 02 '18 at 04:58 PM

avatar image

mpxc
91 8 12 16

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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.

more ▼

answered Sep 24 '18 at 08:19 PM

avatar image

ployer
1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question