PopperCam taking 15ms to execute

It seems there are frame drops in World // Zero sometimes, and when looking at the microprofiler we see huge spikes of the CameraModule taking 15ms to execute.
It’s spamming FindPartOnRayWithIgnoreList

I tried uploading the Microprofile but it told me the file was too large. Let me know if this is definitely needed and I’ll try a 3rd party site and DM it directly. (File uploading limitations hurt our ability to give repros)

7 Likes

Noticed the same issue in our game recently, I believe we tracked it down to an issue with transparent parts.

1 Like

Yeah - we noticed it specifically when players would turn their camera towards certain regions of the map which had several transparent, collidable parts. It caused immense lag, but I was able to find a temporary fix by modifying PlayerModule.CameraModule.ZoomController.Popper, changing line 128 (under the canOcclude function) from getTotalTransparency(part) < 0.25 to getTotalTransparency(part) < 0

local function canOcclude(part)
-- Occluders must be:
-- 1. Opaque
-- 2. Interactable
-- 3. Not in the same assembly as the subject

return
	getTotalTransparency(part) < 0.25 and --change this 0.25 to 0
	part.CanCollide and
	subjectRoot ~= (part:GetRootPart() or part) and
	not part:IsA("TrussPart")
end
2 Likes