If I have a shaded terrain with shady areas and bright areas, I wanted to use EntityColor to darken the grass quads on the shady places. I was using PickedNX etc. to determine if a grass quad should be shaded. I suspect I'm doing something wrong here, maybe somebody can help me? What I do right now is:
I have that vague guess I rather should use Atan2 with pnx and pnz or so, then add the light yaw as an offset and see if the angle is within a certain range, any ideas?
pnx#=pickednx() pnz#=pickednz() pn_shade#=(pnx-pnz)-.2 if pn_shade<0 then shade=255.0-(pn_shade*128.0) limit shade to 0 to 255 use shade for rgb of entitycolor else shade=255 endif
I have that vague guess I rather should use Atan2 with pnx and pnz or so, then add the light yaw as an offset and see if the angle is within a certain range, any ideas?