ajp303
11-21-2005, 10:16 AM
I've currently got a large number of delegates that are working their way through a simple corridor with their z-positions at 0. To those I've linked some geometry to them. After calculating the crowd sim I would like to change the position of the linked geometry to make them appear as if they are going down a ramp.
The following code doesn't seem to work. If I take out the 'if' expression and just set theObj.pos.z to a number it does change. Any ideas where I am going wrong ?
theObj = selectByName()
if theObj != undefined do
for t = animationrange.start to animationrange.end by 5 do
if theObj.pos.x > 12.5 then at time t with animate on theObj.pos.z = (theObj.pos.x - 12.5) * -1
(the crowd sim sets keyframes every 5th frame)
Thanks
The following code doesn't seem to work. If I take out the 'if' expression and just set theObj.pos.z to a number it does change. Any ideas where I am going wrong ?
theObj = selectByName()
if theObj != undefined do
for t = animationrange.start to animationrange.end by 5 do
if theObj.pos.x > 12.5 then at time t with animate on theObj.pos.z = (theObj.pos.x - 12.5) * -1
(the crowd sim sets keyframes every 5th frame)
Thanks
