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 name Parents MFn type Compatible function sets
pointConstraint constraint kPointConstraint kBase
kNamedObject
kDependencyNode
kDagNode
kTransform
kConstraint
kPointConstraint

Related nodes

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

Attributes (37)

constraintOffsetPolarity, constraintParentInverseMatrix, constraintRotatePivot, constraintRotatePivotX, constraintRotatePivotY, constraintRotatePivotZ, constraintRotateTranslate, constraintRotateTranslateX, constraintRotateTranslateY, constraintRotateTranslateZ, constraintTranslate, constraintTranslateX, constraintTranslateY, constraintTranslateZ, offset, offsetX, offsetY, offsetZ, restTranslate, restTranslateX, restTranslateY, restTranslateZ, target, targetParentMatrix, targetRotatePivot, targetRotatePivotX, targetRotatePivotY, targetRotatePivotZ, targetRotateTranslate, targetRotateTranslateX, targetRotateTranslateY, targetRotateTranslateZ, targetTranslate, targetTranslateX, targetTranslateY, targetTranslateZ, targetWeight

Long name (short name) Type Default Flags
target (tg) compound n/a arrayoutputinputconnectablestorable
bundle of matrix, input position, and weight
targetTranslate (tt) double3 outputinputconnectablestorable
input translation
targetTranslateX (ttx) distance (double) 0.0cm outputinputconnectablestorable
input X translation
targetTranslateY (tty) distance (double) 0.0cm outputinputconnectablestorable
input Y translation
targetTranslateZ (ttz) distance (double) 0.0cm outputinputconnectablestorable
input Z translation
targetRotatePivot (trp) double3 outputinputconnectablestorable
input rotate pivot
targetRotatePivotX (trpx) distance (double) 0.0cm outputinputconnectablestorable
input X rotate pivot
targetRotatePivotY (trpy) distance (double) 0.0cm outputinputconnectablestorable
input Y rotate pivot
targetRotatePivotZ (trpz) distance (double) 0.0cm outputinputconnectablestorable
input Z rotate pivot
targetRotateTranslate (trt) double3 outputinputconnectablestorable
input rotate pivot translate
targetRotateTranslateX (trtx) distance (double) 0.0cm outputinputconnectablestorable
input X rotate pivot translate
targetRotateTranslateY (trty) distance (double) 0.0cm outputinputconnectablestorable
input Y rotate pivot translate
targetRotateTranslateZ (trtz) distance (double) 0.0cm outputinputconnectablestorable
input Z rotate pivot translate
targetParentMatrix (tpm) matrix identity outputinputconnectablestorable
input world position
targetWeight (tw) double 1.0 outputinputconnectablestorablekeyable
input weight for the position
constraintParentInverseMatrix (cpim) matrix identity outputinputconnectablestorable
inverse of the parent matrix of the object
constraintRotatePivot (crp) double3 outputinputconnectablestorable
object rotate pivot
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 pivot translate
constraintRotateTranslateX (crtx) distance (double) 0.0cm outputinputconnectablestorable
object X rotate pivot translate
constraintRotateTranslateY (crty) distance (double) 0.0cm outputinputconnectablestorable
object Y rotate pivot translate
constraintRotateTranslateZ (crtz) distance (double) 0.0cm outputinputconnectablestorable
object Z rotate pivot translate
offset (o) double3 outputinputconnectablestorablekeyable
object offset
offsetX (ox) distance (double) 0.0cm outputinputconnectablestorablekeyable
object X offset
offsetY (oy) distance (double) 0.0cm outputinputconnectablestorablekeyable
object Y offset
offsetZ (oz) distance (double) 0.0cm outputinputconnectablestorablekeyable
object Z offset
constraintOffsetPolarity (cop) double 1 outputinputconnectablestorable
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) double3 0.0, 0.0, 0.0 outputconnectable
output point position
constraintTranslateX (ctx) distance (double) 0.0cm outputconnectable
output X point position
constraintTranslateY (cty) distance (double) 0.0cm outputconnectable
output Y point position
constraintTranslateZ (ctz) distance (double) 0.0cm outputconnectable
output Z point position
restTranslate (rst) double3 0.0, 0.0, 0.0 outputinputconnectablestorable
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 outputinputconnectablestorable
rest x translation
restTranslateY (rty) distance (double) 0.0cm outputinputconnectablestorable
rest y translation
restTranslateZ (rtz) distance (double) 0.0cm outputinputconnectablestorable
rest z translation