Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Attaching to Rope, Jitter.
#2
(07-12-2022, 06:39 PM)idmah Wrote: I've been looking at several solutions to connecting something / object to a rope. 

I ended up using this: 

Code:
pathSmoother = ropeComp.GetComponent<ObiPathSmoother>();
ObiPathFrame section = pathSmoother.GetSectionAt(ropePosition);
 m_Character.transform.position = pathSmoother.transform.TransformPoint(section.position);

to move the character to the rope position.  But my rope is attached to a boat and I'm getting a lot of jitter, moving forward and back on the rope, think it's because of stretching. 
I also Tried LateUpdate, FixedUpdate.   But still pops / jitters ups and down the rope. 

Hi!

This code simply places an object at a point along the rope. It involves no actual physical simulation of the attachment, so it’s completely unaffected by when you update the rope (late update, fixed update, etc). As long as this is called after rope simulation every frame, it should move the object to a point in the rope with no jittering at all (unless you rope is extremely overstretched and you’re using sequential evaulation of distance constraints, as irregular tension patterns will appear - see “evaluation mode” in the solver page: http://obi.virtualmethodstudio.com/manua...olver.html but this is a pretty bad problem on itself)

Could you share a video/animation that shows the jittering issue, as well as your complete code?

Quote:Would Pin Constraint be more stable?  
I couldn't find any code examples. 

Pin constraints are meant for a completely different use case: two-way coupled attachment to a rigidbody. Unless this is what you are after (for instance if your character is physically simulated as well) there’s no point in using pin constraints. You can find a code example in the “scripting constraints” section of the manual:

http://obi.virtualmethodstudio.com/manua...aints.html
Reply


Messages In This Thread
Attaching to Rope, Jitter. - by idmah - 07-12-2022, 06:39 PM
RE: Attaching to Rope, Jitter. - by josemendez - 07-12-2022, 08:07 PM
RE: Attaching to Rope, Jitter. - by idmah - 08-12-2022, 04:34 AM
RE: Attaching to Rope, Jitter. - by josemendez - 08-12-2022, 10:02 AM
RE: Attaching to Rope, Jitter. - by idmah - 09-12-2022, 08:36 PM
RE: Attaching to Rope, Jitter. - by idmah - 09-12-2022, 11:08 PM
RE: Attaching to Rope, Jitter. - by josemendez - 10-12-2022, 11:27 AM