Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Calculating the pull on a pin constraint?
#1
Pregunta 
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.
Reply
#2
(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.
Reply
#3
Thanks. Is this calculated from the pinned objects mass?
Reply
#4
(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.
Reply
#5
(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.
Reply
#6
(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().
Reply