Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Climbing on rope and fix to move only on x, y
#11
I have a new issue:

If I cut the rope than the below scripts not give me the correct last particle position.

Can you help me in this?


private int GetFirstParticleIndex() => rope.elements[0].particle1;

private int GetLastParticleIndex() => rope.elements[rope.elements.Count - 1].particle2;


and

public void CutRopeAtIndex(ObiRope rope, int particleIndex)
{
    if ((DateTime.Now - _lastTimeCut).Milliseconds > 100)
    {
        if (particleIndex < rope.elements.Count)
            rope.Tear(rope.elements[particleIndex]);

        rope.RebuildConstraintsFromElements();
        _lastTimeCut = DateTime.Now;
    }
}


How can I get the cutted rope (that remains in the air, and not on the ground) last particle?
Reply


Messages In This Thread
RE: Climbing on rope and fix to move only on x, y - by lacasrac - 23-10-2021, 08:59 AM