oriels/app/dofs/stretch-cursor/og/
2022-10-03 17:28:53 -04:00

18 lines
No EOL
285 B
Text

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