Parts in ViewportFrames have Collision in Workspace

I was walking around while testing ingame, and stumbled upon an invisible object. Because of the way the selectors work in this game, whatever is there should be selectable, but I couldn’t select it. After doing some testing I located exactly what I was colliding with, and it was inside of a viewport. Turning off collision for the object that was inside of the viewport fixed the problem. I have StreamingEnabled on in this game.
image
image

This happens in studio and in game. I can’t be sure of when this started, but I encountered this for the first time today.

2 Likes

I’ll look into this. Do you have a test place file which repros the issue?

viewportTest.rbxl (22.2 KB)
The left door cannot be walked through because there is a blockage inside of a viewport in the object while the right door is the same, but the viewport is parented to ReplicatedStorage.

2 Likes

I think this has to do with the part being a descendant of Workspace, so it still thinks it’s a physical object. You could just set CanCollide to false, as I don’t see any particular reason to have an object collidable while inside of a ViewportFrame.

But think of automated systems, a developer could be making something that automatically puts something into viewportframe to make a nice preview for an object, but since the objects in viewportframes don’t show up physically, nobody would expect it to continue to collide with other objects or interact with the mouse. This doesn’t seem like the intended behavior.

I’ve had a look into this. There isn’t a bug, and it is doing what we intended/expected. Although I do see how this behavior could be unexpected, but there are no direct plans to change it at the moment. However there may be updates in this area which may help this situation in the future.

2 Likes

Well then in said automated system he can just GetDescendants and then set all BaseParts to CanCollide false.

Looks like that’s what I’ll be doing since this is intended, just hope that it will be changed at some point

I mean in all honesty I don’t think it’s that big of a deal for there to be a change, especially when there’s already a way around it.