- Home /
 
               Question by 
               Paprik · Mar 29, 2015 at 04:50 PM · 
                2draycastcanvasuser interface  
              
 
              How to do a 2D raycast within a Canvas?
I'd like to raycast from a canvas point to another canvas point, checking if there are any UI elements in the way. The canvas is in overlay mode.
It's easier to explain this with a picture: 
Do I have to make the canvas a world canvas, add colliders to UI elements and use a 2D physics raycast?
 
                 
                canvas.png 
                (8.7 kB) 
               
 
              
               Comment
              
 
               
              Your answer
 
 
             Follow this Question
Related Questions
How to scale according to different mobile resolutions? 0 Answers
Pointer Enter event doesn't fire Unity 5.5 1 Answer
UI: Dropdown in worldspace 0 Answers
Test line renderer collision? 1 Answer
Clicking on GameObject in 2D 3 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                