Hi, I'm making a game where I need to project a shadow at the exact position of the player, regardless of their height, to accurately calculate jumps. I thought about doing it with a decal and a raycast that detects the ground and places it automatically, but my player model is short, so if I make the decal a little too tall, it ends up above the player, and if I reduce its height, it doesn't work correctly.
It didn’t work; it doesn’t seem to match the layers I use in the rest of the project, since I have them named but in the decal they appear with the default name.
Well, names correspond to numbers, so use those numbers. There’s only one mechanism to exclude decal projection, and that’s cull mask. If it “doesn’t work” - make it work.
I managed to solve it; it turns out there are different types of layers, and the decal uses the 3D rendering layers, which aren’t present in a 3D character body but in the pieces that make up your model. I just had to go piece by piece, assigning them the same layer, and then deselect that layer in the cut mask.