Go to: Related nodes. Attributes.

This node implements a pointConstraint. 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 pointConstraint, the extra information is stored in offset and constraintOffsetPolarity attributes.

The pointConstraint 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: targetTranslate, targetRotatePivot, targetRotateTranslate, targetParentMatrix, and targetWeight.

The elements of each target are normally connected to the target objects as follows:

pointConstraint attribute connected to
targetTranslate translate
targetRotatePivot rotatePivot
targetRotateTranslate rotatePivotTranslate
targetParentMatrix parentMatrix[i]
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 point.

The pointConstraint node uses these inputs to compute the world space position of the pivot point of each target object. It then computes a weighted average of the these pivot points. This weighted average is called the target point.

The constrained object is connected to the constraint* attributes. For a pointConstraint, the constraintRotatePivot, constraintRotateTranslate, and constraintParentInverseMatrix are inputs to the pointConstraint. The attribute constraintTranslate is the only output.

The pointConstraint node computes an output translation value such that the pivot point of the constrained object is offset by offset * constraintOffsetPolarity from the target point.

Although the all the constraint nodes inherit from transform, they do not actively use any of the attributes from transform.

Node nameParentsClassificationMFn typeCompatible function sets
pointConstraintconstraintanimationkPointConstraintkBase
kNamedObject
kDependencyNode
kDagNode
kTransform
kConstraint
kPointConstraint

## Attributes (37)

Long name (short name)TypeDefaultFlags
`target` (`tg`) compoundn/a
 bundle of matrix, input position, and weight
`targetTranslate` (`tt`) double3
 input translation
`targetTranslateX` (`ttx`) distance (double)0.0cm
 input X translation
`targetTranslateY` (`tty`) distance (double)0.0cm
 input Y translation
`targetTranslateZ` (`ttz`) distance (double)0.0cm
 input Z translation
`targetRotatePivot` (`trp`) double3
 input rotate pivot
`targetRotatePivotX` (`trpx`) distance (double)0.0cm
 input X rotate pivot
`targetRotatePivotY` (`trpy`) distance (double)0.0cm
 input Y rotate pivot
`targetRotatePivotZ` (`trpz`) distance (double)0.0cm
 input Z rotate pivot
`targetRotateTranslate` (`trt`) double3
 input rotate pivot translate
`targetRotateTranslateX` (`trtx`) distance (double)0.0cm
 input X rotate pivot translate
`targetRotateTranslateY` (`trty`) distance (double)0.0cm
 input Y rotate pivot translate
`targetRotateTranslateZ` (`trtz`) distance (double)0.0cm
 input Z rotate pivot translate
`targetParentMatrix` (`tpm`) matrixidentity
 input world position
`targetWeight` (`tw`) double1.0
 input weight for the position
`constraintParentInverseMatrix` (`cpim`) matrixidentity
 inverse of the parent matrix of the object
`constraintRotatePivot` (`crp`) double3
 object rotate pivot
`constraintRotatePivotX` (`crpx`) distance (double)0.0cm
 object X rotate pivot
`constraintRotatePivotY` (`crpy`) distance (double)0.0cm
 object Y rotate pivot
`constraintRotatePivotZ` (`crpz`) distance (double)0.0cm
 object Z rotate pivot
`constraintRotateTranslate` (`crt`) double3
 object rotate pivot translate
`constraintRotateTranslateX` (`crtx`) distance (double)0.0cm
 object X rotate pivot translate
`constraintRotateTranslateY` (`crty`) distance (double)0.0cm
 object Y rotate pivot translate
`constraintRotateTranslateZ` (`crtz`) distance (double)0.0cm
 object Z rotate pivot translate
`offset` (`o`) double3
 object offset
`offsetX` (`ox`) distance (double)0.0cm
 object X offset
`offsetY` (`oy`) distance (double)0.0cm
 object Y offset
`offsetZ` (`oz`) distance (double)0.0cm
 object Z offset
`constraintOffsetPolarity` (`cop`) double1
 This is a scalar value by which the offset vector is multiplied, allowing you to animate or tweak the constrained object's offset from its targets by adjusting this single value. The overall offset is equal to constraintOffsetPolarity times the offset vector.
`constraintTranslate` (`ct`) double30.0, 0.0, 0.0
 output point position
`constraintTranslateX` (`ctx`) distance (double)0.0cm
 output X point position
`constraintTranslateY` (`cty`) distance (double)0.0cm
 output Y point position
`constraintTranslateZ` (`ctz`) distance (double)0.0cm
 output Z point position
`restTranslate` (`rst`) double30.0, 0.0, 0.0
 The rest translation defines the output of the constraint when all weights are zero. It is used when the enableRestPosition attribute is true.
`restTranslateX` (`rtx`) distance (double)0.0cm
 rest x translation
`restTranslateY` (`rty`) distance (double)0.0cm
 rest y translation
`restTranslateZ` (`rtz`) distance (double)0.0cm
 rest z translation