Clamp To Constraint 钳制到约束

轴向限定(Clamp To) 约束将一个对象限定到曲线上。轴向限定(Clamp To) 约束和跟随路径( Follow Path )约束非常类似。但不是使用目标曲线计算时间,轴向限定(Clamp To) 获得其自身的实际位置属性(在 变换 属性面板中显示,N),并判断沿着目标曲线在哪里“映射”这个位置。

One benefit is that when you are working with Clamp To, it is easier to see what your owner will be doing; since you are working in the 3D Viewport, it will just be a lot more precise than sliding keys around on an F-curve and playing the animation over and over.

缺点是,不像跟随路径( Follow Path ) 轴向限定(Clamp To) 没有任何选项来约束对象沿得曲线旋转自己,但不是每次场合都会需要旋转,所以在这样的情况下通常是 轴向限定(Clamp To) 更通常很多更加得心应手,来得到你需要一些其他的方式得到的旋转。

从物体的原始位置到曲线上它的位置的映射不是完美的,而是使用下面的简化算法:

  • 选择"主轴",用户或曲线的边界框的长轴(默认值)。

  • 物体的位置相比曲线的边界框在主轴方向。例如,如果X是主轴,物体与曲线边界框的左边对齐,结果是0;如果它与右边对齐,结果是1。

  • 如果未选中循环(cyclic)选项,则该值将被限定在0-1范围内。

  • 这个数字被用来作为曲线的时间,为物体被限定到沿曲线找到最终的位置的时间。

该算法不完全产生所需的准确结果,因为曲线时间不准确地映射到主轴位置。例如一个物体直接在曲线的中心将固定到 0.5 曲线时间而不管曲线的形状,因为它是沿着曲线的边界框。然而,0.5曲线的时间位置实际上可以在任何边界框内!

选项

../../../_images/animation_constraints_tracking_clamp-to_panel.png

Clamp To panel.

Target 目标

The target 数据ID indicates which curve object the Clamp To constraint will track along. The target must be a curve object type. See common constraint properties for more information.

主轴

这个按钮组控制那一个全局轴(x,y或z)是路径的主要方向。当将物体限定到目标曲线上时,它不会在这个轴上显著移动。由于该约束功能的不精确性,它可能会在该轴上产生少量移动。

例如,如果你是火箭发射动画,它将是Z轴,因为发射路径的主要方向是向上的。默认 Auto(自动) 选项选择的轴曲线是最长的。这通常是最好的选择。

循环

By default, once the object has reached one end of its target curve, it will be constrained there. When the Cyclic option is enabled, as soon as it reaches one end of the curve, it is instantaneously moved to its other end. This is of course primarily designed for closed curves (e.g. circles), as this allows your owner to go around it over and over.

Influence

Controls the percentage of affect the constraint has on the object. See common constraint properties for more information.

Example