- Home /
 
               Question by 
               Shinobi_Lord · Aug 05, 2019 at 10:24 PM · 
                vector3boundscontains  
              
 
              Is there a way to check for a line as opposed to a Vector3 point with Bounds.Contains?
Like the title asks, I'm wondering if its possible to check for more than just a single point at a time with Bounds.Contains?
EX :
Vector3 center = ... ;
if(bounds.Contains(center) { return true...
Vector3 topRight = ... ;
if(bounds.Contains(topRight) { return true...
etc.
Or if there is any appropriate alternative.
Thanks in advance for any and all help.
               Comment
              
 
               
              Answer by Vega4Life · Aug 05, 2019 at 10:29 PM
If you are thinking about using a line, maybe for you it's equivalent to using a raycast? Then you could check if the bounds intersects a ray..
https://docs.unity3d.com/ScriptReference/Bounds.IntersectRay.html
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                