- Home /
Question by
$$anonymous$$ · Jan 12, 2014 at 02:30 PM ·
raycastaidetection
180 Degree raycast
How can i fire 180 raycasts in + 1 degree each time. also can i apply one hit variable to all these raycasts or do i have to do this individually. This is for an ai system wich i want to use 180 degree sight detection with raycast.
Comment
Best Answer
Answer by tanoshimi · Jan 12, 2014 at 03:52 PM
You can use Physics.OverlapSphere to perform a 360' raycast, then calculate the vector dot product to determine which of the hits lay in the 180' FoV "in front of" the observer.
Your answer
Follow this Question
Related Questions
Enemy AI, detect player when seen 2 Answers
AI detection script problem 0 Answers
enemy raycast to detect player 1 Answer
raycast hit not detecting && Nav mesh agent ai stealth 1 Answer
Another Raycast Issue. 0 Answers