This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
raycasthit2d [2021/05/05 07:05] andrew900460 Added title, and added another example |
raycasthit2d [2021/05/05 07:11] andrew900460 added syntax coloring for examples |
||
---|---|---|---|
Line 7: | Line 7: | ||
Example: | Example: | ||
- | < | + | < |
RaycastHit2D hit = Physics2D.Raycast(someStartPoint, | RaycastHit2D hit = Physics2D.Raycast(someStartPoint, | ||
Line 16: | Line 16: | ||
This is also valid: | This is also valid: | ||
- | < | + | < |
RaycastHit2D hit = Physics2D.Raycast(someStartPoint, | RaycastHit2D hit = Physics2D.Raycast(someStartPoint, | ||
bool rayHitSomthing = hit; | bool rayHitSomthing = hit; | ||
</ | </ |