Hello, I was making this system showed in the video:
But the problem is that the camera blocks itself if the object is collidable, to explain it better I made another video:
So, to solve it I used collision groups, one for the camera, another one for workspace objects and another one for the Character, because I want the character to collide with objects, but not the camera.
I’m not completely sure what your problem is but it seems like you are talking about the camera not being able to go through the object with its transparency set to 0. This has nothing to do with collision and is actually because of roblox’s default camera controller. You can get this cameraController by playing the game and then taking it from the player scripts. After you copy that and paste it into its appropriate spot you have to edit it to make it do what you want to do.
Hello! I would use raycasting to detect parts between the player and their camera. If you don’t know what raycasting is its basically a line in 3D space that returns information on objects that cross it. Here is some more information about raycasting. Good luck
I actually had this issue when working on a plane that I was making, I didn’t want the camera to be blocked by the plane when the camera was under the plane. But if I were to do what @octav20071 said, it would ignore every single part in the game which is not what I wanted. So to fix this I had to edit one of Roblox’s CoreScripts. To fix the issue, play test your game and inside of the explorer go to:
And scroll down to line 50 where you’ll see a function called refreshIgnoreList(). You can add anything inside of the “blacklist” table that is inside of this function and the camera will totally ignore it. So for example if I wanted to ignore the BasePlate and the BasePlate only, I could replace the function with this:
local function refreshIgnoreList()
local n = 1
blacklist = {}
for _, character in pairs(charMap) do
blacklist[n] = character
n = n + 1
end
table.insert(blacklist, workspace.Baseplate)
end
You’ll see that the camera ignores the BasePlate and the BasePlate only. You’ll also see that there are two other functions called playerAdded() and characterAdded() just under the refreshIgnoreList() function. These are fired when, well, the player and character are added. So you can customize this module to your liking. Hope this helped!
Another function that I would like to point out for @Sarchyx is the canOcclude function. You can put your collision groups checking here as well.
local function canOcclude(part)
-- Occluders must be:
-- 1. Opaque
-- 2. Interactable
-- 3. Not in the same assembly as the subject
return
getTotalTransparency(part) < 0.25 and
part.CanCollide and
subjectRoot ~= (part:GetRootPart() or part) and
not part:IsA("TrussPart")
end