ODE Middleware

Okay; so I’ve got a basic vehicle class set up now, all that’s really left on it is the turning behavior. Right now, in the update method for the vehicle, I’ve got the following:

        newQuat = self.getQuat()
        newQuat[0] = newQuat[0] + self.rotamt * self.rotspeed
        self.setQuat(newQuat)

This should look at whatever the player has set the rotamt to, and rotate based on the vehicle’s rotspeed. This works fine, until it almost completes a spin - it suddenly slows way down. I assume there’s some funkiness with quaternion arithmetic, I’m not really familiar with using quats beyond pulling them out and messing with an axis. I didn’t see any obvious examples of setting a slow, controlled spin in any of the dynamic or kinematic object classes, is there an easy way around this? Or do I need to do something else with the quaternion?