[Closed] On/Off controller for Car Rig controllers??
So I decided to play around with a rig for a car I’ve been modeling. I’ll try to run down what I’ve got so far.
Steering:
I’ve got a point helper, that has a Limit Controller on it to inhibit the user from turning the steering wheel past it’s logical spinning radius. Like for real steering it takes a couple rotations for the front wheels to reach their max turning position. So when you rotate the steering wheel point helper, the front wheels turn along their own axis.
On the front wheels I’ve got 3 Euler XYZ controllers inside of a Rotation List. One is the standard Euler that’s automatically assigned for rotations. The second is for Steering, and the third is for the TravelSpin. The front tires steering rotation is wired to the Steering point helper rotation/4 & -4.
TravelSpin:
The travel spin, makes the wheels turn depending on the back and forth movement of the main car dummy controller. This is set up with an Expression Controller, and the script is
((yPosOfCar-frontAxlePos)*pi)/(pi*rad)
. Subtracting the front Axle position from the position of the car gives me the offset position changes made from the back and forth movement.
So my Question is, how would I go about setting up some kind of controller/attribute/script, that’d allow me to turn off the TravelSpin expression at certain points in an animation. Like in this VIDEO LINK, of what I’ve got so far, I’d like the front tires to stop spinning around the end of the animation (simulating brakes). Thanks for any help.
I’ve never build an car/vehicle rig myself.
But thinking about it an reading the various related threads I would say that they use an the integral of the speed to derive the position at a given time.
The thread about Addtivie Rotation [1] might help to understand the concept.
You set a speed variable somewhere in your rig and basically add up it every frame.
The ‘problems’ start the moment your car should be able to go in different directions.
I think it isn’t too complicated once one understood the concepts – but it is not trivial.
Georg
[1] http://forums.cgsociety.org/showthread.php?f=98&t=497415&highlight=additive+rotation
… umm, my question was ‘how do I add a controller so I can turn my controllers on or off’. So , like I said above, if I have my car driving forwards or backwards, and want to apply the brakes, I want to have the ability to check or uncheck a box (for example), at a certain point in the timeline, and it would tell my TravelSpin controller to stop working. And again, here’s what I’ve got so far… Video of Rig Test ,sorry if I wasn’t clear in my previous post.
ah – ok.
why not add a checkbox to a customattribute?
the checkbox can trigger an boolean controller and this value can be used in your script controller.
your rig looks nice.
Georg
You can wire the value of the weight of the controller in the list to a check button or check box in a custom attribute def.
As has been pointed out, your car can only move along one world axis so far. To problems are going to crop up, what direction are you traveling and are you going forward or backward.
I look forward to seeing what you come up with.
thanks to both rdg & PEN. I set up a checkbox attribute in a dummy above the front tires and one above the back tires. After that I couldn’t figure out what I was supposed to wire it to specifically, then I came back to this post and I saw
wire the value of the weight
from PEN, and after that it all came together. Here’s another vid of what I’ve got. It looks like the back wheels are spinning in reverse, but it’s just that optical illusion that happens when a wheel spins quickly. Around the end of the animation I turn the spin off the front wheels and then the back wheels once the car rotates almost 90 degrees. There’s a little extra back wheel rotation after I disable the spin, I just hand animated that.
I was curious if there’s a way, so that when I check or uncheck a box, to have a point helper change colors? So basically, when the spin’s on, the helper will be green, and when it’s off, it’ll be red.