22-09-2023, 03:17 PM
(This post was last modified: 22-09-2023, 03:34 PM by Alexander34.)
(22-09-2023, 08:55 AM)josemendez Wrote: Hi,thanks for the advice on how to find the middle of the rope, now I need to figure out how to move the centre particle steadily without jerks etc.
Depends on the specifics of your use case, but chances are you'll need to deal with individual elements/particles in the rope to find out the center of a dynamically resized rope, and then set its position.
To find the center, pick the element that's it the middle of the rope.elements list. Then pick one of the particles at either end of the center element, and override its position.
let me know if you need further help,
kind regards
_obiRope.solver.positions.SetVector3(middleElementIndex, transform.position); works too fast and the particle returns to its position in the very next frame
besides, even if we move this asynchronously and via Vector3.Lerp, when we move this central particle, the other particles in the rope don't reach for it, and I need to exactly grab the centre of the rope and move the players elsewhere.