All posts

· 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.

Popper hierarchy
Popper hierarchy
Camera collision group
Collision groups
local function canOcclude(part)
return
getTotalTransparency(part) < 0.25 and
part.CanCollide and
subjectRoot ~= (part:GetRootPart() or part) and
(not part:IsA("TrussPart")) and
PhysicsService:CollisionGroupsAreCollidable(part.CollisionGroup, "Camera")
end