oriels/app/dofs/stretch-cursor/og/
2022-10-03 16:58:07 -04:00

24 lines
No EOL
329 B
Text

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