Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //pseudo code
- foreach target {
- if (Vector3.Angle(target.position-trasform.position,trasform.forward) < a){
- //then target is inside vision cone
- //next you can check vision distance ...
- //next you can check obstacles with a raycast ....
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement