Jump to content

Raycast: Difference between revisions

226 bytes added ,  6 August 2024
Adapted "Raycast in same direction as object?" article from old wiki
(Small improvements)
(Adapted "Raycast in same direction as object?" article from old wiki)
Line 33: Line 33:
On the first frame the normal block can then be moved to the floor, and set to visible (being inside a script block makes it start not visible).
On the first frame the normal block can then be moved to the floor, and set to visible (being inside a script block makes it start not visible).
Then set it in the path of a Raycast line to turn it red.
Then set it in the path of a Raycast line to turn it red.
== Examples ==
Cast a ray in the direction an object is facing.
The <code>{{Port|v|0,0,1}}</code> indicates the object is facing in the positive Z axis by default, and the raycast length is 1.
{{Image|Raycast example1.png}}


[[Category:Blocks]]
[[Category:Blocks]]