Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Set Cloth Properties with script
#3
Hey again, and thanks for the reply.

The code below gives me this error in console:

NullReferenceException: Object reference not set to an instance of an object
CreateObiBP.Start () (at Assets/Shirt and Pants/Shirt/CreateObiBP.cs:36)

Code:
var skinBatch = skinConstraints.batches[0];

Also, im not sure i understand the exactly logic behind the iteration below.

Code:
for (int i = 0; i < skinBatch.constraintCount; ++i)
{
       
        // the skinRadiiBackstop array contains 3 floats per constraint: the skin radius, the collision radius and the collision backstop distance:
        skinBatch.skinRadiiBackstop[i * 3] = < skin radius >;
        skinBatch.skinRadiiBackstop[i * 3 + 1] = < collision radius >;
        skinBatch.skinRadiiBackstop[i * 3 + 2] = < collision backstop >;
}
Reply


Messages In This Thread
Set Cloth Properties with script - by orestissar - 08-04-2021, 02:33 PM
RE: Set Cloth Properties with script - by orestissar - 09-04-2021, 11:07 AM