decentraland / sdk

PM repository for SDK
Apache License 2.0
4 stars 4 forks source link

MeshCollider value NONE not working as expected #1135

Open nearnshaw opened 1 month ago

nearnshaw commented 1 month ago

If I set the collider layer of a MeshCollider entity to CL_NONE, it's the same as leaving the field empty, which defaults to having collisions on physics and pointers.

This works well with the equivalent fields on the GLTFContainer component

CL_NONE enum value is 0, which is bitwise treated the same as not having a ColliderLayer defined, which defaults to CL_PHYSICS & CL_POINTER

We must refactor collision layers to make CL_NONE have an available value (like int.max) and refactor the client to contemplate the CL_NONE use case.

Image

With this simple scene, the blue cube should have no collisions, but it behaves as if it did.