How to rotate a object around its own y axis?

I would like to rotate a node around its own y axis. However, when I run the following code it always rotates around (0,1,0) which is the original axis.

Quaternion pitch90 = new Quaternion().fromAngleAxis(2*FastMath.DEG_TO_RAD, new Vector3f(0f,1f,0f));

bObject.rotate( pitch90);

How could I do?

Rotate a node around its own y-axis:

node.rotate(0, someRadianDelta, 0);

You could also try “setLocalRotation” instead of “rotate”.

Also if you want to rotate around Y axis,by convention you should call your Quaternion yaw.
And 90 degrees would be 90*FastMath.DEG_TO_RAD.