How do i make an AI that can only walk/run in shadows?
i'm starting to make an apocalyptic open world survival game and decided to make a zombie AI script. I've tried for a fair while trying to find answers on google but there has been no luck.
PLEASE HELP!!!
Thanks :)
Answer by PointyPigheadGames · Oct 02, 2016 at 08:45 PM
There is no code that can detect shadows. My recommendation is to have an area where there is shadows as a trigger and if the zombie leaves, he dies. I'm not sure if this is exactly what you want but there is no code to detect shadows.
Sorry!
Thanks for the answer PointyPigheadGames. I'm not exactly sure how to make my AI at the moment. I was hoping for an I Am Legend inspired zombie but it seems extremely difficult. $$anonymous$$eep me updated if you find any kind of breakthrough.
Thanks :)
Well, i've thought about it and I have thought of something similar to a zombie in $$anonymous$$inecraft. It will basically see what time of day it is, and check if it has a block above it. For example, if the time of day is 6:00 (Daytime) and there is not a block above the zombie (creating a shadow), it will burn. If there is a block above the zombie or it is not daytime, it will behave as normal.
I'm wondering if light probes could be (ab-)used for that. Just a wild guess though, i have no idea how to actually do it :)
Your answer
Follow this Question
Related Questions
How would I Move a rigidbody towards another object? 3 Answers
Trying to get AI to follow who ever is closer 2 Answers
Choosing non null values from arrays for pathfinding 2 Answers
object look center when orbiting with near sides 1 Answer
Need support on my basic navmesh ai script to follow the player at a certain distance 1 Answer