The PopperCam uses this API to determine how far forward to move each frame.
You can find this in the latest version of the PopperCam module at line 141.
It should be pretty simple to replace that with a raycast from the HumanoidRootPart to the position of the camera. If the ray hits anything, just set “largest” to the distance between the HumanoidRootPart and the hit position.
You will incurr some performance cost doing this as the Camera API is faster due to it being engine-level.
GetLargestCutoffDistance uses a fixed criteria for what things do and don’t pop the camera. You can’t change that criteria without rewriting this feature from the ground up.
So, I just finished rewriting this feature from the ground up and we’re currently working on getting it shipped.
GetLargestCutoffDistance is going the way of the dinosaurs; all Poppercam logic is now in Lua.
The new criteria is this:
local function canOcclude(part)
return
part.Transparency < 0.25 and
canCollide(part) and -- accounts for avatar's collision group
not part:IsA('TrussPart')
end
There basically wasn’t a good reason to keep this logic in the engine.