sbox-issues icon indicating copy to clipboard operation
sbox-issues copied to clipboard

Crashing when using PhysicsBody's CheckOverlap

Open dotryen opened this issue 1 year ago • 0 comments

Describe the bug

When using PhysicsBody.CheckOverlap(PhysicsBody body) against a mesh related collider it causes an instant crash.

To Reproduce

  1. Make a script that checks if a body is overlapping nearby bodies.
  2. Make a mesh (probably with the Mesh/Block tool in the editor)
  3. Make a primitive and give it a Rigidbody.
  4. Make them overlap or just check it.
  5. Crash

Expected behavior

I don't believe it is possible to check for overlaps in this case (especially since Unity spits out a warning if you try to do something like this and returns false). However I don't think the engine should immediately crash when doing so. It should probably also return false and state that you cannot check for overlaps on mesh colliders.

Media/Files

No response

Additional context

No response

dotryen avatar Aug 15 '24 08:08 dotryen