Could anyone help me out with this problem I am implementing in the 3d package Maya 4.0?

I have a variable called 'scale', representing the scale of a looping animation clip (1 is default, 0.5 is faster, 2 is slower etc.) and another variable called 'upf' (for units per frame).

I am trying towrite an expression where I work out the speed of a body in upf and then adjust the scale of the animation clip relatively. This is computed frame-by-frame as Maya plays.

I currently have this relationship when my animation clip is as follows

distance covered : 10 units
time taken : 20 frames

therefore, the body is travelling at 0.5 upf, whilst the clip is at scale =1

So if the body wre to go twice as fast, the clip would scale by half, to play back quicker in time with the body's foward movement.

so, upf = 0.5 > clip = 1
upf = 1 > clip =0.5;
upf = 2 > clip = 0.25;
upf = 0.25 > clip =2;

and so on.

I just need to be able to write an expression that calculates the clip scale based on the given upf in the above relationship.

eg scale = ????

If anyone could help me out withthis I'd be more than grateful!!



Ben Lambert

[email protected]