Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to get the player camera's cone of view?

I looked in-game and cant seem to get the dimensions of the player's cameras (by cameras I mean VR cameras, since 3D requires two cameras I would need to find both of them). For this specific instance the cone of view and the minimum distance an object can be from the camera before not being rendered.

Specifically, my problem is that I don't want players to be able to just put their head in a wall and see everything. So when the camera is intersecting with an object it blacks out the screen. But I know how to code all of that already, my only issue is the one above.

1 answer

✓ Accepted answer

Try this

local camera = workspace.CurrentCamera
local playerView = camera.FieldOfView

2 comments

0

How do I seperate the two cameras involved in VR 3D, if two even exist that is.

0

well I figured it out, it worked in the end.

This discussion is preserved as it was. New answers, comments, and votes are closed.