So by having the point of view of a character be a light and having enemy tanks only be visible in light from a specific light mask i can well make a Line-of-sight effect.

  • But then as far as I am able to tell there is no way to have other light sources affect those tanks, like being lit up by projectiles flying by.
  • The turret on top of the tank casts a shadow from general light sources that is visible outside 'Line-of_sight'

Even with some clip children trick would I be able to solve the issue with the shadow of the turret?

    Kingstad Finally a decent video! 👍️ Although, what is the problem exactly? I don't really understand what you want to happen.

    Kingstad have you tried using a normal map?
    replace your "tank" sprites with CanvasTextures, then assign a diffuse and a normal map texture. they will then be affected by lighting.
    they might not cast shadows (I don't have much experience with this) but they should be darkened in absence of light.

    the normal map can be something very simple, take your sprite, add a gradient from center and convert to normal map. the way you do this will depend on the image editing software you are using.

      ah well. The eye represents the player character. He should not be able to see the enemy tank if it's not in direct line of sight, something this somewhat achieves. But if another source of light, like a shell/bullet flying by casts a shadow on the turret then you can see that shadow despite it not being in the players direct view.
      Also the tanks chassis cant be lit up in general either using this system. Ideally other light sources would make it bright when close, but if I allow other light sources to interact with it then that means they also reveal it, acting identically to the 'field-of-view' light.

      I'll just make a new video that might make these two points clearer:

      Jesusemora ah normal maps and stuff is new to me. Looks like a normal map is the psuedo-3D looking map kind. After testing that DOES work although it's ability to react to light is barely perceptible, but with an additional light source that only reacts to tanks to compensate that's alright. And the added 3D effect of a proper normal map is a bonus I'll happily take. However the normal map seems inverted? It lights up on the opposite side of what it should relative to where the light is, so I have to flip the image before export. Perhaps a godot thing of using different axis. Will continue to experiment. Thank you!!
      EDIT: Aha, found a import toggle that fixes normalMaps

      EDIT: Erh maybe it didnt solve the issue after all. As long as an object has the 'light only' mode on its material it becomes visible when light hits it, normal map or no.

      I've spent most of a week on this issue but there was one tutorial I had been avoiding because it seemed so convoluted and complicated, and it was, but it was also a solution! It works!
      I am however unsure if it will end up being worth it as this might make the entire project like 4 X as complicated. We'll see
      Also seems like the viewports cant handle overviewing too many pixles at once so there may be a hard limit for how large my maps can be.
      Result: