Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


raycasthit2d

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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:
-<code>+<code c#>
 RaycastHit2D hit = Physics2D.Raycast(someStartPoint, someDirection); RaycastHit2D hit = Physics2D.Raycast(someStartPoint, someDirection);
  
Line 16: Line 16:
  
 This is also valid: This is also valid:
-<code>+<code c#>
 RaycastHit2D hit = Physics2D.Raycast(someStartPoint, someDirection); RaycastHit2D hit = Physics2D.Raycast(someStartPoint, someDirection);
  
 bool rayHitSomthing = hit; bool rayHitSomthing = hit;
 </code> </code>
raycasthit2d.txt ยท Last modified: 2021/05/05 16:57 by uninomiconadmin