- Home /
              This question was 
             closed Aug 11, 2013 at 08:31 PM by 
             DaveA for the following reason: 
             
 
            Question is off-topic or not relevant
Collider Vision AI question. Solved!
Yo.
How would I make a collider like a vision box/cone that activates and deactivates on a bool... and more importantly how would make it use a specific collider for this within the children of the AI object?
Do I have to use use OnTriggerStay()? Or can I use void VisionBox()? and in that void how would I define the VisionCollider? Do I use all colliders as a vision collider?
Pseudo Code:
     public Collider VisionCollider; // this sets the collider for the vision.
     
     bool activateVision = false;
     
     // this is the initial raycast that would be used to activate the vision.
     void Raycasting
     
     if(physics...bla bla bla {
     
     // target sighted
     activateVision = true;
     
     void Update(){
     
     if(activateVision == true){
        
        VisionBox(); //?? 
     
     }else{
     
     
     }
 
 
 //what to do here is where I'm lost    
     VisionBox(){
 
 
 
 
 }
 
 
 
 
 
               Comment
              
 
               
              Follow this Question
Related Questions
Smooth Movement on Geometry Collission? 0 Answers
Surface with hole and Raycast - Which collider 1 Answer
Make Ray hit own collider 1 Answer
[C#] Raycast based AI 2 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                