Entity rotate in the same direction of the Camera

My project:

Entity: http://i.imgur.com/zFuZcvP.png
Result: http://i.imgur.com/30U3j3O.png

My Scripts:

// Get mouse direction

_onMouseMove: function (e) {
    // Get Mouse Direction
    if (pc.Mouse.isPointerLocked() || e.buttons[0]) {
        this.eulers.x -= this.lookSpeed * e.dx;
        this.eulers.y -= this.lookSpeed * e.dy;

// Camera and Entity Direction

this.camera.setLocalEulerAngles(this.eulers.y, this.eulers.x, 0); // Works
this.entity.setLocalEulerAngles(0, this.eulers.y, 0);             // Does not work

I used the tutorial script “First Person Movement”.

What am I doing wrong? What is missing?

this.entity.setLocalEulerAngles(0, this.eulers.x, 0);

Thanks for the help, but it did not work

The problem is that you have a capsule rigid body which has angular factor set to 0, 0, 0. This means that it cannot rotate in any axis at all.

What I would recommend is make the actual character model a child of the Player entity. Then set the local euler angles of that.