Advertisement
Guest User

Untitled

a guest
Jul 29th, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. //pseudo code
  2. foreach target {
  3. if (Vector3.Angle(target.position-trasform.position,trasform.forward) < a){
  4. //then target is inside vision cone
  5. //next you can check vision distance ...
  6. //next you can check obstacles with a raycast ....
  7. }
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement