Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  IdentifyMovingColliders.Execute OutOfBound crash
#5
(24-04-2024, 08:42 AM)Guillaume Wrote: So I guess the only issue we had is that we manage to have a zeroed shape that was still doing some computation and accessing an out of bound index in the collisionMaterials array that is the only unprotected access in the code, and we should have not noticed the out of bound access if we had at least one collision material !

Access to the collisionMaterials array is protected, at least in Obi 6.5.4 which is the current version:

Code:
// Expand bounds by collision material's stick distance:
if (shapes[i].materialIndex >= 0)
    velocityBounds.Expand(collisionMaterials[shapes[i].materialIndex].stickDistance);

There should be no case where a destroyed collider has a materialIndex other than -1, let me know if this is what you're getting.

(24-04-2024, 08:42 AM)Guillaume Wrote: It was not the point of this topic, but the question that came to me is: is it important for the simulation to have collisionMaterials? Or the default values without material are okay?

You can have no collisionMaterial. In that case, friction, stickiness, etc will all be considered to be zero.
Reply


Messages In This Thread
RE: IdentifyMovingColliders.Execute OutOfBound crash - by josemendez - 24-04-2024, 08:55 AM