20-03-2024, 05:07 AM
Hello,
I was using Teleport() to reset out of bounds players and noticed it kept throwing an ArgumentOutOfRangeException error each time (ObiSoftbody.cs Line 189).
I'm using Unity 2022.3.21f1 and a fresh install of the latest Obi Softbody asset on a basic project.
I updated the script as show below (duplicated and commented out old for comparison). It got rid of the error, but I'm not sure if it's correct or could cause other problems. Please advise.
Thank you
HakJak
I was using Teleport() to reset out of bounds players and noticed it kept throwing an ArgumentOutOfRangeException error each time (ObiSoftbody.cs Line 189).
I'm using Unity 2022.3.21f1 and a fresh install of the latest Obi Softbody asset on a basic project.
I updated the script as show below (duplicated and commented out old for comparison). It got rid of the error, but I'm not sure if it's correct or could cause other problems. Please advise.
Code:
for (int j = 0; j < ac.batches[i].activeConstraintCount && j < ac.GetBatchCount(); ++j)
{
sc.batches[j].orientations[batchOffset + i] = rotOffset * sc.batches[i].orientations[batchOffset + j];
}
//for (int j = 0; j < ac.batches[i].activeConstraintCount; ++j)
//{
// sc.batches[j].orientations[batchOffset + i] = rotOffset * sc.batches[i].orientations[batchOffset + j];
//}
Thank you
HakJak