Obi Official Forum
Help Calculating the pull on a pin constraint? - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: Help Calculating the pull on a pin constraint? (/thread-789.html)



Calculating the pull on a pin constraint? - KjetilMV - 13-12-2018

Hi

I need to calculate how much the pinned rigidbody is pulling on the rope. Is there a simple way to calculate the pull on a pin constraint?

Thanks in advance.


RE: Calculating the pull on a pin constraint? - josemendez - 13-12-2018

(13-12-2018, 12:34 PM)KjetilMV Wrote: Hi

I need to calculate how much the pinned rigidbody is pulling on the rope. Is there a simple way to calculate the pull on a pin constraint?

Thanks in advance.

Yep. Use the constraint force getter method:

Code:
Oni.GetBatchConstraintForces(batch,constraintForces,constraintCount,startConstraint);

Returned forces are expressed in Newtons. See ObiPinConstraintBatch.cs BreakConstraints() method as an example on how to use it to determine when to break pin constraints when they're applying too much force.


RE: Calculating the pull on a pin constraint? - KjetilMV - 13-12-2018

Thanks. Is this calculated from the pinned objects mass?


RE: Calculating the pull on a pin constraint? - josemendez - 13-12-2018

(13-12-2018, 06:13 PM)KjetilMV Wrote: Thanks. Is this calculated from the pinned objects mass?

Yes. F = ma, so both the mass of the pinned object and the particle it is pinned to are taken into account.


RE: Calculating the pull on a pin constraint? - Destro26 - 09-12-2022

(13-12-2018, 01:57 PM)josemendez Wrote: Yep. Use the constraint force getter method:

Code:
Oni.GetBatchConstraintForces(batch,constraintForces,constraintCount,startConstraint);

Returned forces are expressed in Newtons. See ObiPinConstraintBatch.cs BreakConstraints() method as an example on how to use it to determine when to break pin constraints when they're applying too much force.

Hi, I'm using Obi Rope V6.4. I don't see the BreakConstraints() method in ObiPinConstraintsBatch.cs. Has this been changed? Are there any other examples of how to use Oni.GetBatchConstraintForces.


RE: Calculating the pull on a pin constraint? - josemendez - 10-12-2022

(09-12-2022, 11:00 PM)Destro26 Wrote: Hi, I'm using Obi Rope V6.4. I don't see the BreakConstraints() method in ObiPinConstraintsBatch.cs. Has this been changed? Are there any other examples of how to use Oni.GetBatchConstraintForces.

This was long ago moved to ObiParticleAttachment.cs, the method is now called BreakDynamicAttachment().