decentraland / sdk

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

On a GLTF setting collision masks to undefined doesn't change the default #926

Closed nearnshaw closed 1 year ago

nearnshaw commented 1 year ago

If I set invisibleMeshesCollisionMask to undefined, The collisions are still there. I need to provide a value for it to change

For example, in the light bounce puzzle scene: https://github.com/decentraland/sdk7-goerli-plaza/tree/main/light-bounce-puzzle

The floor includes some annoying colliders all around the walls that don't let you enter or leave the scene. I wanted to disable these with the following:

    GltfContainer.create(base, {
            src: 'models/baseCheckered.glb',
            invisibleMeshesCollisionMask: undefined,
        })

But the invisible colliders were still there

I had to use the following code to let me walk through the invisible walls:

        GltfContainer.create(base, {
            src: 'models/baseCheckered.glb',
            invisibleMeshesCollisionMask: ColliderLayer.CL_POINTER,
        })

(setting the collision layer to only pointer colliders, instead of undefined)

nearnshaw commented 1 year ago

It works using invisibleMeshesCollisionMask: ColliderLayer.CL_NONE