· 1 min read
Camera collisions on Roblox
A simple tweak for a scalable camera collision system
The problem
While working on some games, I've needed to modify Roblox's default camera to allow for a user to "move through" an opaque part. By default, this behavior is not officially supported.


local function canOcclude(part)returngetTotalTransparency(part) < 0.25 andpart.CanCollide andsubjectRoot ~= (part:GetRootPart() or part) and(not part:IsA("TrussPart")) andPhysicsService:CollisionGroupsAreCollidable(part.CollisionGroup, "Camera")end