final stretch-cursor pattern revision
This commit is contained in:
parent
394ad51ae6
commit
ec595d9e20
1 changed files with 5 additions and 11 deletions
|
@ -1,24 +1,18 @@
|
|||
input
|
||||
to = [pos, ori]
|
||||
from = [pos, ori]
|
||||
tipTo = [pos, ori]
|
||||
tipFrom = [pos, ori]
|
||||
|
||||
data
|
||||
cursor = [0, 0, 0]
|
||||
|
||||
frame
|
||||
vector = to.pos - from.pos
|
||||
vector = tipTo.pos - tipFrom.pos
|
||||
length = vec.length
|
||||
dir = vector / 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
|
Loading…
Add table
Reference in a new issue