Login

Fancade Wiki

Updated Screen To World.md (markdown)

... ...
@@ -1,5 +1,8 @@
1 1
Given a screen coordinate, outputs the start and end points of a line going through that point (2 and 400 units away from the camera, respectively). That might sound weird, but usually you'll just wire those points into a [[Raycast]] to find the object the user tapped!
2 2
3
(Due to a technical issue, still to be fixed, the output lags by one frame. I.e. if you [[Set Camera]] on frame N then this block's output will change on frame N+1.)
3
[[/uploads/Screen_To_World.png]]
4 4
5
[[/uploads/Screen_To_World.png]]
... ...
\ No newline at end of file
0
# Notes
1
Due to a technical issue, still to be fixed, the output lags by one frame. I.e. if you Set Camera on frame N, then this block's output will change on frame N+1.
2
3
Because of this bug, the script will not work on the first frame. To avoid incorrect values, use the block's output only if the [[Current Frame]] is greater than 0.
... ...
\ No newline at end of file
Fancade Wiki