[Problem]
I am trying to add 2 new layers to the RayCast detection layers used by the CameraRaycaster.cs script. But only the Walkable and Enemy layers seem to be detected.
[What I Did]
I added the 2 layers to the tags and layers inspector panel
Player = LayerMask 10
Friendly = LayerMask 11
Added 2 new items to the scene with colliders and set the layers for the new layers.
I edited Utility.cs and added 2 lines to the emu:
public enum Layer {
Walkable = 8,
Enemy = 9,
Player = 10,
Friendly = 11,
RaycastEndStop = -1
};
I added the following edit to the layerPriorities in CameraRaycaster.cs:
public Layer[] layerPriorities = {
Layer.Enemy,
Layer.Walkable,
Layer.Friendly,
Layer.Player
};
[Conclusion]
Removed the component from the camera and added the component back to see if it would solve.
I searched the Unity community for answers but found no help.
I ensured all the boxes in the Physics Matrix for the 2 layers were checked.
Reversed the order of the layers in the Tags and Layers inspector panel placing Player at layer 8 and Friendly at layer 9 and the detection worked for only those 2 layers and not the Walkable or Enemy layers.
[Insight]
I am thinking its has something to do with the bitShitf and the double digits and will continue further testing and troubleshooting.