Go to: Related nodes. Attributes.

This node implements a tangentConstraint. Each constraint has a set of targets that are connected under the target attribute, a single constrained object that is connected to the constraint* attributes, and possibly other information to help compute the correct results. In the case of the tangentConstraint, the additional information is: aimVector, upVector, worldUpVector, worldUpMatrix, and worldUpType.

The tangentConstraint node can have any number of target inputs. Each target is connected to attributes inside a single element of the target attribute. For example, the first target object would be connected elements of target[0], the second target object would be connected to elements of target[1], etc. The elements of each target are: targetGeometry and targetWeight.The elements of each target are normally connected to the target objects as follows:
tangentConstraint attribute connected to
targetGeometry worldSpace
targetWeight set to 1.0
The targetWeight attribute is not generally connected to the target object. Instead, it may be animated by other means to adjust the weighted average computation for the target orientation.The constrained object is connected to the constraint* attributes. For a tangentConstraint, the constraintTranslate, constraintRotatePivot, constraintRotateTranslate, constraintJointOrient, and constraintParentInverseMatrix are inputs to the tangentConstraint. The attribute constraintRotate is the only output.The tangentConstraint node uses the constraintTranslate, constraintRotatePivot, constraintRotateTranslate, and constraintParentInverseMatrix attributes to compute the world space position of the pivot point of the constrained object. Then, for each target geometry, the closest point is found and the tangent at that point is computed. Each tangent is then added into a weighted average vector and the constrained object is oriented so that the aimVector (see below) matches the weighted average vector.The additional tangentConstraint inputs tell the constraint node how to aim the constrained object. The aimVector attribute defines a vector in the space of the constrained object that should be aligned with the weighted average vector computed by the constraint. The upVector, worldUpVector, worldUpMatrix, and worldUpType define how the constrained object is rotated about the aimVector.The upVector defines a vector in the space of the constrained object, very much like the aimVector does. The constrained object is rotated so that the aimVector matches the weighted average vector and so that the upVector aligns as closely as possible with the computed world up vector. The world up vector is determined by the worldUpType, worldUpVector, and worldUpMatrix attributes.The attribute worldUpType can have one of 5 values, which affects the calculation of the world up vector as shown in the following table.
Mnemonic Value Description
scene 0 The upVector is aligned with the up axis of the scene and worldUpVector and worldUpObject are ignored.
object 1 The upVector is aimed as closely as possible to the origin of the space of the worldUpObject and the worldUpVector is ignored.
objectrotation 2 The worldUpVector is interpreted as being in the coordinate space of the worldUpObject, transformed into world space and the upVector is aligned as closely as possible to the result.
vector 3 Default: The upVector is aligned with worldUpVector as closely as possible and worldUpMatrix is ignored.
none 4 No up vector is used in the computation of the orientation of the constrained object; only the aim vector and the target curve's tangents are used. Specifying an up vector can cause flipping to occur when the constrained object's new orientation vector is close to the up vector. If the worldUpType is instead set to none, this flipping won't happen, at a loss of control over twisting.
While setAttr requires the numeric values for the worldUpType attribute, both numeric and mnemonic values are allowed by the tangentConstraint command.Although the all the constraint nodes inherit from transform, they do not actively use any of the attributes from transform.
Node name Parents MFn type Compatible function sets
tangentConstraint constraint kTangentConstraint kBase
kNamedObject
kDependencyNode
kDagNode
kTransform
kConstraint
kTangentConstraint

Related nodes

aimConstraint, geometryConstraint, orientConstraint, normalConstraint, parentConstraint, pointConstraint, poleVectorConstraint, scaleConstraint, lookAt

Attributes (47)

aimVector, aimVectorX, aimVectorY, aimVectorZ, constraintJointOrient, constraintJointOrientX, constraintJointOrientY, constraintJointOrientZ, constraintParentInverseMatrix, constraintRotate, constraintRotateOrder, constraintRotatePivot, constraintRotatePivotX, constraintRotatePivotY, constraintRotatePivotZ, constraintRotateTranslate, constraintRotateTranslateX, constraintRotateTranslateY, constraintRotateTranslateZ, constraintRotateX, constraintRotateY, constraintRotateZ, constraintTranslate, constraintTranslateX, constraintTranslateY, constraintTranslateZ, constraintVector, constraintVectorX, constraintVectorY, constraintVectorZ, restRotate, restRotateX, restRotateY, restRotateZ, target, targetGeometry, targetWeight, upVector, upVectorX, upVectorY, upVectorZ, worldUpMatrix, worldUpType, worldUpVector, worldUpVectorX, worldUpVectorY, worldUpVectorZ

Long name (short name) Type Default Flags
target (tg) compound n/a arrayoutputinputconnectablestorable
Bundle of matrix, input position, and weight
targetGeometry (tgm) Generic n/a outputinputconnectablestorable
input geometry to which the object should be constrained
targetWeight (tw) double 1.0 outputinputconnectablestorablekeyable
Input weight for the position
constraintParentInverseMatrix (cpim) matrix identity outputinputconnectablestorable
Input parent inverse matrix for the object
aimVector (a) double3 outputinputconnectablestorable
Input aim vector (in local coordinates)
aimVectorX (ax) double 1.0 outputinputconnectablestorable
Aim vector X component
aimVectorY (ay) double 0.0 outputinputconnectablestorable
Aim vector Y component
aimVectorZ (az) double 0.0 outputinputconnectablestorable
Aim vector Z component
upVector (u) double3 outputinputconnectablestorable
Input up vector (in local coordinates)
upVectorX (ux) double 0.0 outputinputconnectablestorable
Up vector X component
upVectorY (uy) double 1.0 outputinputconnectablestorable
Up vector Y component
upVectorZ (uz) double 0.0 outputinputconnectablestorable
up vector Z component
worldUpVector (wu) double3 outputinputconnectablestorable
Input world up vector (in local coordinates)
worldUpVectorX (wux) double 0.0 outputinputconnectablestorable
World up vector X component
worldUpVectorY (wuy) double 1.0 outputinputconnectablestorable
World up vector Y component
worldUpVectorZ (wuz) double 0.0 outputinputconnectablestorable
World up vector Z component
worldUpMatrix (wum) matrix identity outputinputconnectablestorable
Input world matrix for the up object
worldUpType (wut) enum 3 vector outputinputconnectablestorable
Input behavior to resolve world up vector.
constraintTranslate (ct) double3 outputinputconnectablestorable
Object translation (in local coordinates)
constraintTranslateX (ctx) distance (double) 0.0cm outputinputconnectablestorable
Object X translation
constraintTranslateY (cty) distance (double) 0.0cm outputinputconnectablestorable
Object Y translation
constraintTranslateZ (ctz) distance (double) 0.0cm outputinputconnectablestorable
Object Z translation
constraintRotatePivot (crp) double3 outputinputconnectablestorable
Object rotate pivot (in local coordinates)
constraintRotatePivotX (crpx) distance (double) 0.0cm outputinputconnectablestorable
Object X rotate pivot
constraintRotatePivotY (crpy) distance (double) 0.0cm outputinputconnectablestorable
Object Y rotate pivot
constraintRotatePivotZ (crpz) distance (double) 0.0cm outputinputconnectablestorable
Object Z rotate pivot
constraintRotateTranslate (crt) double3 outputinputconnectablestorable
Object rotate translate (in local coordinates)
constraintRotateTranslateX (crtx) distance (double) 0.0cm outputinputconnectablestorable
Object X rotate translate
constraintRotateTranslateY (crty) distance (double) 0.0cm outputinputconnectablestorable
Object Y rotate translate
constraintRotateTranslateZ (crtz) distance (double) 0.0cm outputinputconnectablestorable
Object Z rotate translate
constraintRotateOrder (cro) enum 0 outputinputconnectablestorable
Input constrained object rotate order value.
constraintJointOrient (cjo) double3 outputinputconnectablestorable
Input constrained object joint orient (if any).
constraintJointOrientX (cjox) angle (double) 0.0deg outputinputconnectablestorable
Input constrained object joint orient X.
constraintJointOrientY (cjoy) angle (double) 0.0deg outputinputconnectablestorable
Input constrained object joint orient Y.
constraintJointOrientZ (cjoz) angle (double) 0.0deg outputinputconnectablestorable
Input constrained object joint orient Z.
constraintRotate (cr) double3 outputconnectable
Output orientation
constraintRotateX (crx) angle (double) 0.0deg outputconnectable
Output X orientation
constraintRotateY (cry) angle (double) 0.0deg outputconnectable
Output Y orientation
constraintRotateZ (crz) angle (double) 0.0deg outputconnectable
Output Z orientation
constraintVector (cv) double3 outputconnectable
Output vector from constrained object to target position
constraintVectorX (cvx) distance (double) 0.0cm outputconnectable
Output X vector from constrained object to target position
constraintVectorY (cvy) distance (double) 0.0cm outputconnectable
Output Y vector from constrained object to target position
constraintVectorZ (cvz) distance (double) 0.0cm outputconnectable
Output Z vector from constrained object to target position
restRotate (rsrr) double3 outputinputconnectablestorable
Rest orientation. When enableRestPosition is enabled, and all the weights sum to zero, this is the output orientation of the constraint.
restRotateX (rrx) angle (double) 0.0deg outputinputconnectablestorable
rest X orientation
restRotateY (rry) angle (double) 0.0deg outputinputconnectablestorable
rest Y orientation
restRotateZ (rrz) angle (double) 0.0deg outputinputconnectablestorable
rest Z orientation