Using sliders to control expressions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi there. I've been trying for a while to find out how one would go about controlling expressions using a sliders (intslider/floatslider).
What I'm trying to do is I'm trying to create a slider for a car I'm rigging using MEL and expressions. So far I've managed to do something very basic after a lot of struggle. Heres my expression code:
body.translateZ = time*2; body|back_left.rotateX = body.translateZ*125; body|back_right.rotateX = body.translateZ*125; body|front_right.rotateX = body.translateZ*125; body|front_left.rotateX = body.translateZ*125
What I need is a slider that controls the value of the "2" on the first line. So say for example, creating a intslider with a min/max value of 0 and 10 would mean that as the slider changes from lets say value 4 to 5, it would also do the same as well on the expression.
And as for the wheels, the body essentially drives the wheels since the wheels are a child of the body as shown in the code above. I would appriciate any input :), thanks.