Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Teleport() causing ArgumentOutOfRangeException error
#1
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.  

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
Reply


Messages In This Thread
Teleport() causing ArgumentOutOfRangeException error - by HakJak - 20-03-2024, 05:07 AM