Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  how can i creat a chain at run time
#4
(31-07-2020, 04:33 AM)huahuapro Wrote: it seems i'm banned? may be i'm using VPN?

so what is
Code:
constraintIndex
in
Code:
batch.stiffnesses[constraintIndex * 2 + 1] = 10000; // really high compliance value frees up rotation.
thanks.

Hi there,

We haven't banned you, and your user account doesn't list as banned in the forum, so you should be able to post normally. What makes you think you might be banned? Edit: we do have anti spam filters in place, that check if you're behind VPN. This might be flagging you as a spammer, as most spammers use VPNs.

constraintIndex is the index of the constraint you want to modify.  Each time you call AddConstraint(), you add a new constraint. When you want to later modify an existing constraint, you use the index of the constraint to determine what constraint to modify. 0 for the first constraint, 1 for the second constraint, 2 for the third constraint, etc.

After your code:
Code:
batch.AddConstraint(0, character, transform.localPosition, Quaternion.identity);
batch.AddConstraint(blueprint.activeParticleCount - 1, hookAttachment.collider.GetComponent<ObiColliderBase>(),
                                                          hookAttachment.collider.transform.InverseTransformPoint(hookAttachment.point), Quaternion.identity);

You would do:
Quote:batch.stiffnesses[0 * 2 + 1] = 10000;
batch.stiffnesses[1 * 2 + 1] = 10000;

To set the compliance for both the first and the second constraint.
Reply


Messages In This Thread
RE: how can i creat a chain at run time - by josemendez - 31-07-2020, 10:35 AM