Sunday, 28 September 2014

Lesson 2 - Constraints

Constraints are similar to parenting objects however, whereas a child will inherit all movements of its parent object, with constraints the object will only take on the movement of the type of constraint. For example, orient constraints make objects inherit rotations. Point constraints are for translations. Scale constraints are for scaling.

For the most part, we will use point and orient constraints.

Above is a simple test of constraints. We have two orient constraints on each tyre attached to two controllers. These controllers allow a user to grab and manipulate them in order to move the objects.
One orient controls tyre rotation and the other controls steering.

The controllers can be drawn using CV Curve Tool (Create > CV Curve Tool).


Start by making two tyres and put each one in its own group. Move the GROUP pivot to the middle of each tyre respectively. To do this open the outliner, click the group and press 'insert' to move the pivot. Press 'insert' again when it's in the right position.

Next, draw a double headed arrow controller using the CV Curve Tool. This one will be used to control steering.

 Select the controller followed by either tyre, in this case I'm highlighting the left tyre, then open the Orient Constraint tool menu (Animation tool set > Constrain > Orient > click the small box).

You want 'Maintain offset' on otherwise the object will move itself. Set 'Constrain axes' to 'Y' as we want to turn the tyre only on the 'Y' axes. This means if we rotate the controller any other way than 'Y' it won't affect the tyre. Apply these settings.

Notice the red exclamation point in the outliner. This is your constraint. If something went wrong just click it and press delete and try again. Now when you rotate the controller on the 'Y' axis, the tyre should move with it. Do the same with the right tyre so they both move together.

Try doing this for the tyres on the 'X' axes now which will allow the tyre to rotate forward and back.



No comments:

Post a Comment