This feature is now enabled everywhere as of 1/5/2022
A third collision option is now added to compliment CanCollide
and CanTouch
, called CanQuery
.
CanQuery
This property lets you determine if the part will be hit by spatial queries, such as raycasts or bound overlap checks. A part that has CanQuery
set to False
will always be ignored by spatial queries, even if the part is whitelisted.
CanQuery
can only be set if the part also has CanCollide
turned off. It will be hidden in the Properties window unless you disable CanCollide
. If you otherwise set it to be false while CanCollide
is still true, it has no effect (the part will still be hit by spatial queries).
Let’s recap:
CanCollide
- determines if the Part will be hit by other parts as physical collisions.
CanTouch
- determines if the Part will trigger touch events touch events on itself and other parts.
CanQuery
- determines if the Part will be hit by spatial query methods (raycast, overlap, region3).
This means, you can disable all three and the Part will be excluded from all collision computations. As you can expect, this can provide a significant performance benefit. Like I mentioned with the release of CanTouch, you may see some improvements now, with better ones coming down the road.
CanQuery Beta
Edit: the property is out of beta and is now live for everyone as of Jan 5th!
This is being released as a beta feature so we can test out a few things and address known issues:
-
You may have realized that excluding a part from raycasts will lead to the part being unselectable by the Studio dragger tools. You’re right, this is a known issue. The dragger tools will be updated to override the property in Studio during the beta so you can still select things.
We realize that the ability to disable selection on parts can be helpful. Over time, the dragger’s behavior will be extended to allow this. Tell us your thoughts on this! -
We decided to reorganize the Part property ordering in order to put all the Collision properties in one category. Feel free to leave feedback on this as well.
-
Make sure there are no unforeseen issues, of course!