knoxie
11-24-2006, 03:12 AM
Is it possible to get maya to add constant a value to a float on every frame? Ultimately I want to control the translateX of a vehicule based on a custom speed control.
eg:
//Adds 1 to itself on every frame
$addOne = ????;
//vehicule.speed is a custom attribute to control translateX speed
$speed = vehicule.speed;
//vehicule starts at 0 in translateX and increases based on vehicule.Speed
vehicule.translateX = 0 + ($addOne * $Speed);
It sounds simple... but for the love of god i can't get my head around the $addOne bit.
Cheers.
Carl
eg:
//Adds 1 to itself on every frame
$addOne = ????;
//vehicule.speed is a custom attribute to control translateX speed
$speed = vehicule.speed;
//vehicule starts at 0 in translateX and increases based on vehicule.Speed
vehicule.translateX = 0 + ($addOne * $Speed);
It sounds simple... but for the love of god i can't get my head around the $addOne bit.
Cheers.
Carl
