Hello guys,
I am working at the moment on a foliage filter, when i place my picnic blanket on a grassy ground that the grass will hide, if its inside of the box extent. That works pretty well. But if i rotate on z axis my blanket, of course i wont effect the filter.
Here is my code of my custom node in my material editor.
if(FoliagePostion.x >= MeshPosition.x - MeshExtent.x && FoliagePostion.x <= MeshPosition.x + MeshExtent.x &&
FoliagePostion.y >= MeshPosition.y - MeshExtent.y && FoliagePostion.y <= MeshPosition.y + MeshExtent.y &&
FoliagePostion.z >= MeshPosition.z - MeshExtent.z && FoliagePostion.z <= MeshPosition.z + MeshExtent.z)
return 0;
else
return 1;
Does anyone know the math formula for roation z axis as well?
Greets