Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Cloth stop working once adding another solver/mesh
#3
(24-02-2019, 06:55 PM)scripts Wrote: I was running into a similar issue. I started tracing the issue from an ObiHandle and found that (in my particular case) the handle was not applying its behavior because the callback delegate was not being called.

I believe this is because the ObiSolver component is using a static boolean variable('frameBegan') to track the beginning frame (since physics may tick multiple times).

However, when I spawn more than 1 cape, it's random which one will actually stay on the character's back. Consider the following code snippets; when one of the capes Enters its Update, it prevents the following capes from having their 'OnBeginFrame' delegate being called back for ObiHandles to function.

I'm curious if there's a bug or pending refactor, I'm not to a point where I can start making assumptions  Sonrisa (but this seems like a similar symptom)

ObiSolver.cs
Code:
void Update(){

   if (Application.isPlaying){
       BeginFrame(false);
       //...
   }
}
void BeginFrame(bool fixedUpdate){

   if (!frameBegan){
    frameBegan = true; //<^ only 1 solver in the scene will exhibit full behavior
       //..
       if (OnFrameBegin != null)
        OnFrameBegin(this,EventArgs.Empty);
    //...
   }
}

This is a known bug and has been fixed in 4.0.3 (yet unreleased). You can find the fix in this thread:

http://obi.virtualmethodstudio.com/forum...hp?tid=887
Reply


Messages In This Thread
RE: Cloth stop working once adding another solver/mesh - by josemendez - 25-02-2019, 07:36 AM