- Home /
 
               Question by 
               DayyanSisson · Aug 10, 2012 at 06:41 PM · 
                physicsraycastspherecastarguments  
              
 
              SphereCast Arguments
I've been trying to SphereCast but I can't seem to put the arguments in the right order no matter what I do. Here's what I've tried:
 Ray sCast = new Ray(hit.point, finder.forward);
 Physics.SphereCastAll(sCast, brushSize, finder.forward, brushSize, out sHit);
sHit = RaycastHit
sCast = Ray
brushSize = distance/radius
finder.forward = direction
What do I keep doing wrong here?
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by ScroodgeM · Aug 10, 2012 at 08:50 PM
http://docs.unity3d.com/Documentation/ScriptReference/Physics.SphereCastAll.html
RayCastHit[] hits = Physics.SphereCastAll(hit.point, brushSize, finder.forward, brushSize);
SphereCastAll returns ALL hits, so there's no single argument 'out hit'
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                