Selection raycasting should not consider collision groups

Setting collisions between the default collision group to false in Studio prevents me from being able to click-select instances in the viewport. This is because to my knowledge the raycast created fails to collide with the instance. As a Roblox developer, this behaviour is not entirely obvious and greatly affected my workflow by destroying one of my place files until I discovered the issue.

To visualise the problem, run game:GetService("PhysicsService"):CollisionGroupSetCollidable("Default", "Default", false) in the command bar and try to select unlocked instances. It is impossible.

Since I accidentally set the collision groups, this left me confused and unable to work on my place (even when exporting it). Thanks to the help from someone, I learnt that I could fix this by typing game:GetService("PhysicsService"):CollisionGroupSetCollidable("Default", "Default", true) in the command bar.

A solution would be to prevent selection raycasting taking into account collision groups, isolating the raycast to its own unique group, or preventing developers from making the Default group not collide with itself.

Edit:

I cannot think of a valid use-case where developers would rely on the current behaviour.

It has been brought up in a recent thread about this that some plugins rely on this behaviour to make ghost parts. This should never have had to be a work-around, as it makes the above solutions harder and less likely to be introduced for the purpose of back-compatibility.

If Roblox is able to address my issue, it would help prevent me and other developers from accidentally bricking our place files and would make builders’ lives much easier.

7 Likes

Sorry to necro this but please could someone consider this. It’s incredibly annoying and unintuitive.

In my case there are some parts that are meant to be “visual” only so they’re in a collision group that’s set to not collide with anything including the Default group. I still need to move these parts around every now and then – it messed me up trying to figure out why I couldn’t select the parts until I looked it up, and WHY the selection tools are NOT selecting parts that are not locked.

This behavior is extremely unintuitive, I don’t think this is even mentioned anywhere in the docs. I did not bother looking at PhysicsService or CollisionGroup pages, because how does that make any sense? Studio Editor selection tools not click-selecting certain unlocked parts does not lead me to think it’s anything to do with raycasting, but with the editor being bugged for some reason.

Now of course I’ll work around it, but the reason why this is a problem in the first place bugs me out so much.

2 Likes

Tbh I kinda agree, if you’re raycasting using white/blacklists then collision groups should be ignored.
If I want to use collision groups I will set it to collision group mode myself.

This hasn’t really been a huge issue for me but I can definitely see why you would want to exclude collision groups in a list-only mode.