Announcement

Collapse
No announcement yet.

AI detecting flashlight?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    AI detecting flashlight?

    I saw a few topics about it, but didn't find proper solution. I'm developing stealth game, where you have to explore dark house at night with only a flashlight. Inside that house would be a few enemies who would "see" your flashlight. But I don't know how to make detection system. I know about line tracing, but how can I use it? Tracing between light source and enemy is useless because player must be directly visible for this, tracing between end of light cone and enemy is useless too because enemies will see player through a walls. Seems like the only way is to detecting light itself, but even if it's possible I can't use realtime shadows since game is for mobile.
    Is there any workaround?

    #2
    Sure it's possible, simply make a cone-mesh with the size of the lightcone, turn it invisible and trace against it.

    Comment

    Working...
    X