[Closed] personal spider walk in CAT with time warp
hey guys…
i’m trying to make a script to create a connection to timewarp in CAT with my custom animation…
shortly… i have a path with a defined velocity… and i made a loop walk… with this script i want to give a different value to timewarp curve to slow down or speed up the walk cycle…
so if the path runs to quick… the legs move fast… if the path go slow… the legs move slow…
anyone can help me in this nightmare?? :buttrock:
cheersss
edit.
i tried to start with basic geometry
a box and a sphere
i make an expression in x.position of sphere with this script:
obj = $Box001
timeres = 1
fn timewarp t =
(
t0 = t-timeres
t1 = t
p0 = at time t0 obj.position
p1 = at time t1 obj.position
dif = p1-p0
len = length(dif)
timewarp = len
)
timewarp(currentTime)
if the box accelerate… the sphere moves…
but the sphere stop with constant velocity…
if the box decelerate, the sphere goes back…
WTF!
can you help me?
EDIT:
adding:
magn = distance dif p1
timewarp = magn
the sphere moves correctly… this make sense??