Can you still hit the collider of an object that's been culled via a camera's culling mask?
Context: I'm trying to come up with a way to selectively apply a blur affect to game objects. I'm trying to achieve this by changing the layer of the chosen objects to one which is culled by the main camera, but rendered by an identical camera with the blur effect applied. This is output to a render texture displayed directly behind the objects. The problem is these objects have colliders which stop responding to raycasts when they're only being rendered by the blurry camera.
Problem: Is there some way to still use an objects collider that's being culled via the camera's culling mask?
To clarify, the objects themselves are being instantiated and exist in the scene, they're simply not being rendered by my main camera.
Answer by AdamStox · Nov 09, 2016 at 04:37 PM
In case anyone else stumbles across this with the same problem, my solution was to add the colliders to an empty gameObject and child that to the original object. Keeping this empty object on the original layer, while moving the others to the culled layer lets you still interact with collider.
Your answer
Follow this Question
Related Questions
[SOLVED]Why my culling mask don't work? 1 Answer
Multiplayer Camera Layer Issues 1 Answer
Hiding Spotlight from only 1 camera 0 Answers
Camera Culling Mask Change 3 Answers
Can Cinemachine Virtual Cameras have their own culling masks? 1 Answer