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
|
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
|
Loading…
Add table
Reference in a new issue