Snaps a named node to a position and/or rotation formed by a rigid body defined from the currently selected nodes.
Use snapToRigid when you need to constrain a node to a location defined by a rigid body operation.
If neither option for
ranges is used, then the operation will affect the current frame only.
The units for the
-absolute option are millimeters.
Values for the default relative option are a percentage of the distance from the first selected node to the second selected node.
Use of the
-positionOnly option prevents rigid body rotations from being applied to the target node. This option can be useful when you want to snap an object, like a baseball bat to a new location while maintaining the rotational orientation of the bat.
snapToRigid is different from snapToSystem and snapToSystemAlign in that snapToRigid defines a rigid body out of the selected markers and uses its coordinate system. The rigid body is defined at a frame the command determines. snapToSystem and snapToSystemAlgin do not use a rigid body, they refine the coordinate system at each frame.
|float||yes||Specifies the position offset to apply to the object being snapped on the Z axis of the space defined by the selected markers.|
|float||yes||Specifies the position offset to apply to the object being snapped on the Y axis of the space defined by the selected markers.|
|float||yes||Specifies the position offset to apply to the object being snapped on the X axis of the space defined by the selected markers.|
|string||yes||Name of the node that will be snapped.|
|Name||Flag arguments||Argument type||Exclusive to||Comments|
|0||—||ranges||Performs the snap over the entire animation range.|
|0||—||rotationOnly||Only modifies the position of the node being snapped.|
|0||—||positionOnly||Only modifies the rotation of the node being snapped.|
|0||—||—||Specifies the offset is in mm rather then a percentage of the distance between the first two nodes that define the system.|
|0||—||allTime||Performs the snap over the selected time ranges.|
// This sequence of commands will create a new Marker node
// and snap its position over all time to a position offset by
// the indicated number of millimeters ( -50 in X, 50 in Y,
// and 50 in Z) calculated from the origin of a temporary rigid
// body created from LFWT, LMWT, and LBWT. The offset is applied
// in the local coordinate system of the temporary rigid body.
// The rigid body coordinate system is then expressed in rotations
// relative to world space and applied to the target node,
create Marker snapRigidTest;
select LFWT LMWT LBWT;
snapToRigid -allTime -absolute snapRigidTest -50 50 50;