Compatible With ScriptsCompatible With ExpressionsCompatible With The Command Line

 

double MoveTo (object slave, object master, int state )

 

Return Value: 1.0 for success, 0.0 for failure

 

Arguments:

slave item to move
master item whose world position slave must match
state 1 = on 0 = off
 

Along with Align( ) you probably won't use any function more often. This function creates a "position constraint", forcing the slave item to match the position of the master item. Note that this is not necessarily the same thing as copying the motion channels from master to slave since the items could both have completely different hierarchies. The function works in world coordinates, after it calculates the two items will occupy the same point in world space. One of the most common uses for this function is to attach two items together as though they were parented, but no rotational information is inherited (i.e. rotating the master object does not affect the slave, whereas rotating a parent would affect the child). 

 

Combining this function with the Align( ) function produces results that are identical to parenting (except that you can't transform the child since it's motion is being controlled by these functions).

Converted from CHM to HTML with chm2web Pro 2.82 (unicode)