oriels/app/dofs/stretch-cursor/og/
spatialfree 5afb8eb097 -init
2022-10-03 16:54:23 -04:00

20 lines
No EOL
308 B
Text

input
to = [pos, ori]
from = [pos, ori]
data
cursor = [0, 0, 0]
frame
vec = to.pos - from.pos
len = vec.length
stretch = max(len - deadzone, 0)
dir = pointer ? to.ori * v3.fwd : vec / len
cursor = to.pos + dir * stretch * strength
design
pointer = false
deadzone = 0.1
strength = 3