Accurate Raycast Distance

43
44
0
1

Move the Mouse around to change the raycast angle


This bundle outputs the actual distance to the edge of the target object (not its center). However, it only works for square, non-rotatable targets (they can still be movable).


Thanks to JR01 for combining the code into 1 expression; it makes the performance a lot better and the distance outputs instantly.


TinkerSmith already created something similar using a different method, here: https://flowlab.io/game/play/1488234

Editor