Hi, the second script problem I have had in as many days!!
I have the following script below that basically affects all objects with "Balls" in their title. It looks to see if the balls objects have moved from their last frame to the current frame and sets their morpher modifier value to 100 or 0 based on the outcome.
My issue is its taking all movenets, ie x,y,z and rotation. I would like it to only be affected by x,y and z. Does anyone know how I can edit this code to only use the position not rotation?
MyArray = $Balls* as array
for i = 1 to MyArray.count do
(
t0 = f-1
t1 = f
p0 = at time t0 myarray[i].pos
p1 = at time t1 myarray[i].pos
if p0==p1 then WM3_MC_SetValue myarray[i].morpher 1 0.0
else WM3_MC_SetValue myarray[i].morpher 1 100.0
)
I think its the .pos section that needs something else added, but I have no idea!
Many thanks
Mark
I have the following script below that basically affects all objects with "Balls" in their title. It looks to see if the balls objects have moved from their last frame to the current frame and sets their morpher modifier value to 100 or 0 based on the outcome.
My issue is its taking all movenets, ie x,y,z and rotation. I would like it to only be affected by x,y and z. Does anyone know how I can edit this code to only use the position not rotation?
MyArray = $Balls* as array
for i = 1 to MyArray.count do
(
t0 = f-1
t1 = f
p0 = at time t0 myarray[i].pos
p1 = at time t1 myarray[i].pos
if p0==p1 then WM3_MC_SetValue myarray[i].morpher 1 0.0
else WM3_MC_SetValue myarray[i].morpher 1 100.0
)
I think its the .pos section that needs something else added, but I have no idea!
Many thanks
Mark
Comment