Object ignores player collisions and raycast. Help?

Hi, I’m fairly new to this. But I’ve been trying to find a solution through old questions to no avail.

What I’m trying to do is to limit the ramdom movement of these cubes. So they stay inside an invisible container. The way I’m doing it is by making walls that only the cubes can colide.
I managed to make it so the player can go though them no problem, but its a 3rd person camera system that uses raytrace, and everytime the camera goes through that wall, it freaks out.

The way I managed to delete the collision is by putting the player and the walls in specific layers that I managed in the PhysicsManager. So I can’t just use the IgnoreRaycast layer.

Help?

You will have to make sure the camera raycast does not test against the layer the walls are in.

look at the info regarding layermasks.