raycasthit2d
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
raycasthit2d [2021/05/05 16:53] – uninomiconadmin | raycasthit2d [2025/01/15 04:35] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 2: | Line 2: | ||
==== Casts Implicitly To a Bool ==== | ==== Casts Implicitly To a Bool ==== | ||
- | |||
RaycastHit2D implements the C# [[https:// | RaycastHit2D implements the C# [[https:// | ||
- | + | <code csharp> | |
- | ++++ Example: | | + | public static implicit operator bool(RaycastHit2D hit) => (Object) hit.collider != (Object) null; |
+ | </ | ||
+ | ++++ Example | | ||
<code c#> | <code c#> | ||
RaycastHit2D hit = Physics2D.Raycast(someStartPoint, | RaycastHit2D hit = Physics2D.Raycast(someStartPoint, |
raycasthit2d.1620233608.txt.gz · Last modified: 2025/01/15 04:35 (external edit) · Currently locked by: 217.113.194.140