Hello, I’ve been dealing with a frustrating issue with the in-game CSG API (which was talked about in this dev-forum post from 2018: New Roblox In-Game CSG API is now available)
I’d only come across the UnionAsync and SubtractAsync API’s recently, but I was really excited at the thought of how much cool things I could try to implement with this functionality. An idea I’d wanted to try for my mini-project, was to use SubtractAsync to make a large hole in the ground, and then to have a chessboard appear by flying up through that hole. (Using UnionAsync later to cover up that hole when the chessboard eventually goes away)
So far, what I’d came up with seems to work fine inside Studio testing: in-studio clip - Album on Imgur
But, when I’d tried publishing the game and trying it outside of Studio, there’d seemed to be some odd rendering behaviors: in-game clip - Album on Imgur (The first chessboard had some weird stuff happening below it, and the creation of the third board caused the entire union to turn transparent)
I’d tested with two players; sometimes one player would see rendering defects while for the other player there wouldn’t be any. And sometimes the creation of another board (another SubtractAsync operation) would cause the whole union to become visible again. In contrast, I haven’t been able to reproduce any rendering defects while inside studio
I guess this specific usage of the CSG API shouldn’t really be that important for my own mini-project, but it could potentially be used for so much cool things! Which is why I really want to use it. I don’t know yet how universal this occurrence is; maybe for me I’d just did something wrong. For those curious, the code I’d wrote which was relevant to this was:
local to_subtract = Instance.new("Part")
to_subtract.Size = Vector3.new(64, CreationAnimation.Depth, 64)
to_subtract.CFrame = board.PrimaryPart.CFrame + Vector3.new(0, CreationAnimation.Depth/2)
local union = workspace.Ground:WaitForChild("GroundPart_Center"):SubtractAsync({to_subtract})
GroundTextures.Add(union)
union.Parent = workspace.Ground
delay(1, function()
workspace.Ground.GroundPart_Center:Destroy()
union.Name = "GroundPart_Center"
-- and then moving the chessboard up
end)
Maybe this is a bit niche, but I would appreciate any kind of feedback. I probably should try testing the issue some more