My issue is MeshParts sunken into terrain to add detail, ends up making the lighting incorrectly remove the sky color from being applied to the MeshParts and surrounding area UNLESS I turn off cast shadow, which still ruins their look as they now don’t self-shadow.
I saw a bug report about this shading artifact a while ago, and saw a roblox staff member reply saying it was intentional. (if this is intentional, it’s ugly and looks and feels incorrect despite it maybe technically being correct, roblox aint photorealistic so there’s no reason for them to not fix this)
Has anyone every had to deal with this? And if so I’d love to know a potential fix to allow the MeshParts to cast their shadows while also not causing that weird unshaded-ness to it.
Any help towards fixing this would be very appreciated!
Then, at runtime (or in studio) you can simply run smth like this:
local function applyHitbox(rock)
local hitbox = hitboxes:FindFirstChild(rock.Name)
if not hitbox then return warn(`[setupRocks] failed to find collision mesh for rock "{rock.Name}" (rock will have box collision)`) end
hitbox = hitbox:Clone()
hitbox.Name = "Hitbox"
hitbox.Size = rock.Size
hitbox.CFrame = rock.CFrame
hitbox.Parent = rock
rock.AudioCanCollide = false
rock.CanCollide = false
rock.CanTouch = false
rock.CanQuery = false
end
for _, rock in rocks:GetDescendants() do
if rock:IsA("MeshPart") then
applyHitbox(rock)
end
end