Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ColliderMesh with collider layer = NONE #419

Merged
merged 1 commit into from
Aug 6, 2024
Merged

Conversation

nearnshaw
Copy link
Member

No description provided.

Signed-off-by: Nicolas Earnshaw <[email protected]>
Copy link

Deploying documentation with  Cloudflare Pages  Cloudflare Pages

Latest commit: 50bfaea
Status: ✅  Deploy successful!
Preview URL: https://6381c400.new-docs-6m4.pages.dev
Branch Preview URL: https://nearnshaw-patch-5.new-docs-6m4.pages.dev

View logs

@@ -131,6 +131,10 @@ You can configure a `MeshCollider` component or the `GltfContainer` component to
- `ColliderLayer.CL_CUSTOM1` through to `CL_CUSTOM8`: Can be used together with raycasts, so that a ray only detects collisions with one specific layer.
- `ColliderLayer.CL_NONE`: Doesn't respond to collisions of any kind.

{{< hint warning >}}
**📔 Note**: To disable collisions form a `MeshCollider` component, delete the component. Do not set the collision layer to `ColliderLayer.CL_NONE`. There's a known issue with the `MeshCollider` component. Instead of disabling all collisions, it makes this value equivalent to the default (`ColliderLayer.CL_PHYSICS | ColliderLayer.CL_POINTER`).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ColliderLayer.CL_NONE should work as expected

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed this a bit over Slack but I'll bring some context here for the record:
I created an issue here: #418
"The technical explanation: 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."

A potential fix would be to change the enum value, but that would require more development time, in the mean time I think this warning is enough to be clear to creators that this is a known issue, what do you think @gonpombo8 ?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me until we have a proper fix 👏

@nearnshaw nearnshaw merged commit f5f6def into main Aug 6, 2024
2 checks passed
@nearnshaw nearnshaw deleted the nearnshaw-patch-5 branch August 6, 2024 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants