## TranslatePivot

### Introduced

v5.0

### Description

Moves an object's pivot to the specified global position. The pivot is the point about which local scaling and rotation are applied.
Note: Translating the pivot does not affect the object's pose, neutral pose or local transform values. Only the pivot's (local) position and its compensation values are affected.

### Scripting Syntax

    TranslatePivot( [InputObjs], [X], [Y], [Z] );

### Parameters

Parameter | Type | Description
--- | --- | ---
InputObjs | String | List of objects or components. Default Value: Selected elements
X | Double | Global X position of the pivot point Default Value: 0.0
Y | Double | Global Y position of the pivot point Default Value: 0.0
Z | Double | Global Z position of the pivot point Default Value: 0.0

### Examples

#### JScript Example

    /*
            Create 15 nulls and move all their pivots to the origin.
    */
    NewScene(null, 0);
    var oColl = new ActiveXObject("XSI.Collection") ;
    var vPos = XSIMath.CreateVector3();
    var oNull;
    for(i=0; i<15; i++)
    {
            vPos.Set(5,i,5);
            oNull = ActiveSceneRoot.AddNull();
            oNull.LocalTranslation = vPos;
            oColl.Add(oNull);
    }
    //Move the pivot points to the origin.
    TranslatePivot(oColl,0,0,0);
    //Display the pivot points in the camera view. They will all be at the origin.
    SetValue("Camera.camvis.compobjunselcenterpivot", true, null);

### See Also

Translate