final stretch-cursor pattern revision

This commit is contained in:
spatialfree 2022-10-03 17:28:53 -04:00
parent 394ad51ae6
commit ec595d9e20

View file

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