Skill Level Intermediate
- [Instructor] A limit controller lets us set upper and lower boundaries for the range of any float controller such as rotation around a single axis. We'll use a limit controller on the claws of this robot arm in order to prevent them from rotating too far. Now I've set this up and oriented the pivot points of these two claw objects so that their y-rotations are symmetrical. The same y-rotation value will rotate the two objects in opposite directions.
So we don't have to worry about creating two animation tracks or somehow reversing the sign of one track and making it the negative value of the other. All I did was rotate the pivot points. To illustrate, I'll go to the Move tool, and go into Local reference coordinate system. And we can tumble around in the perspective view. We can see that the y-axis of one claw is pointed in the positive y-axis of the world.
And the y-axis of the other claw is pointed in the negative y-axis of the world. If we select them both with the Control key, go over to the Rotate tool, switch it to Gimbal reference coordinate system which is the true rotation reference coordinate system, and finally, set it to use pivot point center over here. Now finally we can rotate these both around y and we can see that they rotate opposite directions even though they have the same rotation value.
I've got Angle Snaps turned on. I can turn that off and get a little bit smoother motion. Let's test the values that we need for the limit controller. Getting close on the front view, right-click in there and press the Z key to zoom in, and test the rotations. It looks like the maximum rotation we'll want is 25 degrees, and the minimum, I'd say negative five degrees. Okay, now we have the information we need and we can go ahead and assign the limit controller.
Select one of them, go over to the Motion panel, open up a Assign Controller, open up Rotation, select Y Rotation, and click Assign Controller. From the Assign Flow Controller dialogue, choose Float Limit and click OK. The Properties dialogue opens up. The upper limit will be 25. The lower limit, negative five.
We can close the Flow Limit dialogue box. If we ever need to get it back, we can double-click on Y Rotation. And now let's test it. Rotate that object, and it can only go in a certain limited rotation range. Even if we go beyond 25, it won't actually rotate that far. All right, that's pretty cool. We can finish up by assigning that same controller to the other claw object so that they always rotate symmetrically.
Right-click on the Y Rotation track and choose Copy. Go over to the other object, in the Assign Controller rollout, open up Rotation and choose Y Rotation. Right-click and choose Paste. We get a popup dialogue box asking if we want to paste as a copy or an instance. We want to paste as an instance if we want them to move together. Click OK, and now if we select either one of them and rotate in Y, they both rotate together in opposite directions, and only within the limits of negative five to 25 degrees.
That's how we can use a float controller to set upper and lower boundaries on any floating point track such as a single rotation channel.