How do you make it so that your camera can pass through bricks without changing the camera script, or welding invisible parts?
isn’t camera suppose to pass through transparency part?
You can make the bricks you want your camera to pass through non-collidable, or slightly transparent.
By default the bricks must be of transparency ≥.25 for the camera to pass through. If you were willing to overwrite the camera’s popper script, you could overwrite the canOcclude
function to edit the minimum transparency required for a camera to pass through an object. You could also add your own custom checks for tags that you can label objects with and make the camera pass through certain objects with a certain tag.
local function canOcclude(part)
-- Occluders must be:
-- 1. Opaque
-- 2. Interactable
-- 3. Not in the same assembly as the subject
-- (4. You could add your own check as well!)
return
getTotalTransparency(part) < 0.25 and
part.CanCollide and
subjectRoot ~= (part:GetRootPart() or part) and
not part:IsA('TrussPart')
--[[
and *Check to see if an object does not have a certain tag*
(If it does have the tag it should return false, therefore making the
camera pass through objects that have the tag)
--]]
end
11 Likes
I’m looking through the CameraModule under player scripts, and there is no “canOcclude” found in “Poppercam”.
It’s the Popper script, not the Poppercam script
1 Like