Vector math question

How can I rotate(per radians or degrees) a vector around it's orthogonal axis (specified by another vector)?

I need it for a camera with the ability to roll it's up vector around it's direction axis.

I have read the examples, but they all focus on 2D-camera-rotating with a fixed up-axis.

Ok, got it :slight_smile:

   private Quaternion _roll = new Quaternion();
   private Vector3f _upAxis = new Vector3f();
   private Vector3f _tempAxis = new Vector3f();

   public void roll(float value)
      _roll.fromAngleAxis(FastMath.DEG_TO_RAD * value, getCamera().getDirection());
      _roll.toRotationMatrix().mult(_upAxis, _tempAxis);