Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Rope Attachment on dynamic rope length and Stitching questions
#3
(17-04-2023, 07:34 AM)josemendez Wrote: Yes, depending on how large the force applied to a constraint is, your solver "budget" might not be enough for it to keep particles from separating. If you don't want to spend more substeps in the simulation, a simple solution is to set the renderablePosition of both particles to the same value during the solver's OnInterpolate event. This is just visual, won't affect the simulation.

I still have a gap between the last ObiBone (a rod) particle and the first rope particle.

Code:
private void Solver_OnInterpolate(ObiSolver solver)
    {
        int firstRopeParticle = rope.elements[0].particle1;
        int lastRodParticle = rod.solverIndices[rod.solverIndices.Count() - 1];
        Vector3 pos = solver.renderablePositions[lastRodParticle];
        solver.renderablePositions[firstRopeParticle] = pos;
    }


(17-04-2023, 07:34 AM)josemendez Wrote: What exactly do you mean? Bones are usually children of the root object, so they are expected to rotate together with the object.

I'm not sure, something is wrong with the bone rotation, so it looks like there is torsions on the 3d model, the gizmos look like that on the model I've been using:

   
   

But if I import the exact same model in the same scene, and place a Obi Bone component on it, it looks fine:

   


I've checked my bone rotation, and apart from the first one they are all 0,0,0. And scale is right in the editor, all 1,1,1

Thanks,
Reply


Messages In This Thread
RE: Rope Attachment on dynamic rope length and Stitching quesitons - by Balou - 17-04-2023, 02:48 PM