I'm writing a simply physics engine for a game I'm working on (it's simple enough that a full physics engine isn't justified), and I'm trying to scale the angular velocity (a quaternion) by the frame time (in seconds) when I integrate it into the rotation of a physics node. The end result should be that the angular velocity represents the rotation the node will make in a second rather than the rotation each frame.

Right now, I'm trying to do it with this:

Quaternion rotation = node.getAngularVelocity().mult(timePerFrame);

rotation = node.getLocalRotation().mult(rotation);

node.setLocalRotation(rotation);

The problem is that with this approach, the quaternion seems to go to zero after a few frames, which seems to break quaternion math. Normalizing the quaternion seems to just remove the effect completely, so I'm wondering what I should be doing.

Any help would be greatly appreciated, even it it's just telling me I'm an idiot and I should be doing something else.