# \[CS4\] 3D rotation via AS resets pivot point?

**URL:** <https://forum.kirupa.com/t/cs4-3d-rotation-via-as-resets-pivot-point/289398>\
**Category:** flash\
**Created:** [May 29, 2009, 7:39pm UTC](https://forum.kirupa.com/t/cs4-3d-rotation-via-as-resets-pivot-point/289398 "2009-05-29T19:39:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![efos](https://avatars.discourse-cdn.com/v4/letter/e/a5b964/32.png) [@efos](https://forum.kirupa.com/u/efos)\
**Post date:** [May 29, 2009, 7:39pm UTC](https://forum.kirupa.com/t/cs4-3d-rotation-via-as-resets-pivot-point/289398/1 "2009-05-29T19:39:07Z")

</div>

Trying to make a gearshift. I’ve set the 3d rotation point of the head and shaft to the base of the shaft. But when I execute the following code:

```auto

function frEvt(e:MouseEvent):void{
    if (bDrag){
        mcHead.rotationX = nStartRot + (nStartY - e.stageY)
        mcShaft.rotationX = mcHead.rotationX
        mcSheath0.rotationX = mcHead.rotationX*.75 //These are the segments of the rubber cover at the base
        mcSheath1.rotationX = mcSheath0.rotationX*.75
        mcSheath2.rotationX = mcSheath1.rotationX*.75
    }
}

```

They just spin in place around their center points, rather than move as one object. How do I adjust the origin for rotationX/Y/Z in AS3?
