Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Attachment not work
#1
I have a problem I can't understand the reason, I have 2 cloaks of different types, I added Static groups in both to attach with it to the parent character, it works only in the first case.
https://ibb.co/YyS5WKb

https://ibb.co/6tBL0fP
Reply
#2
(27-10-2021, 04:47 PM)OsirisDev Wrote: I have a problem I can't understand the reason, I have 2 cloaks of different types, I added Static groups in both to attach with it to the parent character, it works only in the first case.
https://ibb.co/YyS5WKb

https://ibb.co/6tBL0fP

Hi!

It's hard to tell what the cause might be just from the screenshots. Is the cloth (or any transform up its hierarchy) scaled?

On a side note, I see you've added the ObiSolver component way inside of the character's hierarchy. This is quite probably not what you want. Simulation happens in the solver's local space. If you place the solver at the character's neck, when the neck bone rotates or moves the cloth will rigidly rotate with it: for instance, if the character looks right, the entire cape will rotate instantly with his head like a piece of cardboard.

This is often not desirable. For characters, it's typical to place the solver at the character's root. This ensures that the cloth consistently follows the character around, but any motion in the character's body affects the cloth realistically.
Reply
#3
(28-10-2021, 08:32 AM)josemendez Wrote: Hi!

It's hard to tell what the cause might be just from the screenshots. Is the cloth (or any transform up its hierarchy) scaled?

On a side note, I see you've added the ObiSolver component way inside of the character's hierarchy. This is quite probably not what you want. Simulation happens in the solver's local space. If you place the solver at the character's neck, when the neck bone rotates or moves the cloth will rigidly rotate with it: for instance, if the character looks right, the entire cape will rotate instantly with his head like a piece of cardboard.

This is often not desirable. For characters, it's typical to place the solver at the character's root. This ensures that the cloth consistently follows the character around, but any motion in the character's body affects the cloth realistically.

I found error code:

The particle group 'Static' references a particle that does not exist in the actor 'ObiCloakSlonGay'.
UnityEngine.Debug:LogError (object)
Obi.ObiParticleAttachment:Bind () (at Assets/Obi/Scripts/Common/Utils/ObiParticleAttachment.cs:243)
Obi.ObiParticleAttachment:Actor_OnBlueprintLoaded (Obi.ObiActor,Obi.ObiActorBlueprint) (at Assets/Obi/Scripts/Common/Utils/ObiParticleAttachment.cs:204)
Obi.ObiActor:LoadBlueprint (Obi.ObiSolver) (at Assets/Obi/Scripts/Common/Actors/ObiActor.cs:1132)
Obi.ObiClothBase:LoadBlueprint (Obi.ObiSolver) (at Assets/Obi/Scripts/Cloth/Actors/ObiClothBase.cs:181)
Obi.ObiSolver:AddActor (Obi.ObiActor) (at Assets/Obi/Scripts/Common/Solver/ObiSolver.cs:1134)
Obi.ObiActor:AddToSolver () (at Assets/Obi/Scripts/Common/Actors/ObiActor.cs:338)
Obi.ObiActor:SetSolver (Obi.ObiSolver) (at Assets/Obi/Scripts/Common/Actors/ObiActor.cs:372)
Obi.ObiActor:OnTransformParentChanged () (at Assets/Obi/Scripts/Common/Actors/ObiActor.cs:328)
UnityEngine.GUIUtilityLenguarocessEvent (int,intptr,bool&)

But this Particles Group - Static is exists!

About "This is often not desirable. For characters, it's typical to place the solver at the character's root. This ensures that the cloth consistently follows the character around, but any motion in the character's body affects the cloth realistically."

Neck attachment looks much better than root since root is in pivot (ground) base.

P.S. Could it be a problem that I have 2 Solvers for cloaks?
Reply
#4
(29-10-2021, 08:34 AM)OsirisDev Wrote: I found error code:

The particle group 'Static' references a particle that does not exist in the actor 'ObiCloakSlonGay'.

But this Particles Group - Static is exists!

Are you sure it does exist, or is it just a different particle group that has the same name? Try removing the attachment component and adding it back again - in case you copied the attachment from another actor it will try to use a group that only exists on the old object (even though it has the same name as a group in the new object), hence the error telling you that this group references inexistent particles.

Note just re-selecting the appropriate particle group would work fine as well, but remove and re-readd the component just to make sure this is the issue.

(29-10-2021, 08:34 AM)OsirisDev Wrote: Neck attachment looks much better than root since root is in pivot (ground) base.

You can attach it to wherever you want. Not talking about the attachment, but the simulation space. For characters, it's typical to simulate in the character's local space, hence you need to place the solver at the root. Then you can attach the cloth to the neck or any other place in the character. Simulating in the neck's local space is a really weird choice.

Solvers behave as an inertial reference frame. If you place it at the neck, when the neck rotates the entire cape will do too. This is not what you want. Instead, when the neck rotates only the upper portion of the cape should rotate at first, then physics slowly propagate this rotation down the cape.

(29-10-2021, 08:34 AM)OsirisDev Wrote: P.S. Could it be a problem that I have 2 Solvers for cloaks?

Nope, you can have as many solvers as you want.
Reply
#5
Thanks for the answers! I'll check it and report)
Reply
#6
Deleting and adding Particle Attachment Component is a fix! Thanks again!
Reply