Lights and rendering

Hi, is it possible to render an object with a light ? I want my enemy to be invisible to the player and to be only seen with the players “flashlight”. Is it achievable ?

Thanks,

Shirriru

Yes. There are multiple ways to do this. One would be to

  • set the visibility to be hidden for the enemy.
  • make a Boolean variable in your game mode that is true when the light is on
  • then if the enemy is in your sight and have the light on, change the visibility to true for that enemy.