Custom camera collision property

As a Roblox developer, it is currently impossible to customize the camera so it can’t go through any individual part regardless of transparency. As of right now, it seems like if the transparency of an object is no larger than .95, then the camera can’t phase through it (with the poppercam update, this will “prevent the camera from popping in and out rapidly when it encounters transient obstructions between you and your avatar,” so this gave me the idea.) My suggestion is to maybe add some additional element to parts that will let developers make the camera be unable to phase through the object(s) with this element set to true no matter what the transparency is at without having to make elaborate scripts.

2 Likes

Can you provide some examples of things you’d like the camera to ignore?

Does that address this request?

A good example is in-game shops. Normally, a developer would have the part they are using to prevent players from getting behind the counter of where the NPCs are (usually) at to be invisible. When you have the transparency be .95, it can be a bit sloppy, so to say, to see a part that’s just barely visible when the camera is at a certain angle.

Yep, that does, yet what I’m also suggesting is making it so developers can choose which specific invisible parts they don’t want to allow the camera to pop/phase through unless this update you guys are currently working on will do just that.

This will be possible with the update. You can give those invisible parts an 'IsOccluder' tag and then add a condition to canOcclude:

local function canOcclude(part)
	return
		CollectionService:HasTag(part, 'IsOccluder') or
		(part.Transparency < 0.25 and
		canCollide(part) and
		not part:IsA('TrussPart'))
end

I’ll look into adding ways to configure this without forking the playerscripts.

9 Likes

Woohoo, thanks!

1 Like