- Home /
 
               Question by 
               Elite-Goliath · Oct 12, 2017 at 03:06 AM · 
                raycastingraycasthit2drangeraycasts  
              
 
              Raycast2D range never changes when it's defined.
I have a very simple Physics2d.Raycast where I want to be able to define the range of the ray. However, it's always the same short distance, no matter how I define it. 1f and 20000f have the same range when tested in the game scene. Here is the code:
 Vector2 emission = new Vector2(_myCollider.transform.position.x + colliderOffset, 
     _myCollider.transform.position.y + _colliderY);
 RaycastHit2D foundHit = Physics2D.Raycast(emission, Vector2.right, 200000f);
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                