Rotate the transform node by 0 or 180 degrees

I would like to rotate the transformContainer (and BoxAnimated) by 0 or 180 degrees as in this example:
 if (event.inputIndex === PointerInput.Move && event.movementX) {
           rootNode.rotate(Vector3.Down(), event.movementX * 0.005);
            if(event.movementX >= 0) {
                // i.e. look ahead
                 transformContainer.rotate(Vector3.Up(), 0);
            } else {
              // turn around 180 degrees
               transformContainer.rotate(Vector3.Up(), Math.PI);

Does anyone have an idea?
it works, but BoxAnimated changes position all the time.

cc @ryantrem and @bghgary

Did you see this in the code?

Also, rotate’s second parameter takes a delta, not an absolute value. See doc.

Hello @igorroman777 just checking in, was your question answered?