Raycast: Difference between revisions
link to Object
|  (Adapted "Raycast in same direction as object?" article from old wiki) |  (link to Object) Tags: Mobile edit Mobile web edit Advanced mobile edit | ||
| (One intermediate revision by the same user not shown) | |||
| Line 12: | Line 12: | ||
| Traces a line between two points and outputs the following correspondingly: | Traces a line between two points and outputs the following correspondingly: | ||
| * [[Truth (True & False)|True]] if it hits an object. | * [[Truth (True & False)|True]] if it hits an [[object]]. | ||
| * The point where the object is detected, or <code>0, 0, 0</code> otherwise. | * The point where the object is detected, or <code>0, 0, 0</code> otherwise. | ||
| * The object that was hit, or <code>None</code> if none is detected or the ground is hit. | * The object that was hit, or <code>None</code> if none is detected or the ground is hit. | ||
| Line 36: | Line 36: | ||
| == Examples == | == Examples == | ||
| Cast a ray in the direction an object is facing. | Cast a ray in the direction an object is facing. | ||
| The <code>{{Port|v|0,0,1}}</code> indicates the object  | The <code>{{Port|v|0,0,1}}</code> indicates the object points in the positive Z axis by default, and the raycast length is 1. | ||
| {{Image|Raycast example1.png}} | {{Image|Raycast example1.png}} | ||
| [[Category:Blocks]] | [[Category:Blocks]] | ||