FPS Demo Question

I am working on something base on the FPS demo http://developer.playcanvas.com/en/tutorials/advanced/fps-controller/. Instead of setEulerAngles to camera, I rotated the camera’s parent entity Player. Then I make the changes below in input.js update function. However, the character is not moving to the facing direction now… Any idea?

Thanks,

Ang

          update: function (dt) {
            var input = false;

            // Calculate the camera's heading in the XZ plane
            var transform = this.player.getWorldTransform();  //It was camera in the demo