Nope, that's one of the features I decided not to implement for the demos. You could modify the CharacterControllers to create a StaticCharacterMotionConstraint while the character is in the air and give it appropriately low maximum force values. Or, since the robustness of a solved constraint is less important for air control, you could just do whatever you want to velocities to achieve your desired behavior.I noticed that there's no air control. Is there a built-in way to implement this?
It sounds like the simulation was given pose integrator callbacks that include damping. If you're using something like the DemoPoseIntegratorCallbacks, the damping implementation simply scales the current linear velocity by a value below 1 each time step. This has the effect of converging to a velocity of 0 over time. Since 0 velocity is measured according to a fixed 'world' frame of reference, jumping while on a moving boat will make the character appear to drift relative to the boat.Additionally, when the character stands on a moving object—such as a ship—and jumps, he doesn't have the same velocity as the moving object, meaning jumping is quite unpredictable in terms of where you'll land (sometimes not even on the same object). When a character stands, I'm assuming friction makes him move with whatever he's on top of. What would be the best way to go about giving him the same velocity as the object beneath him when he jumps?
To address this, either use a smaller (or zero) linear damping or use a damping implementation that is aware of your frame of reference. In this case, perhaps wind speed or something. You could also use the ship's local frame of reference, although that's not exactly physical.
Incidentally, this is part of the reason why I didn't include air control in the demos. It's nonphysical and requires game-specific heuristics to produce decent results. On a moving boat, you'd probably want air control to be relative to the local frame of reference.
For an instantaneous angular impulse t, ApplyAngularImpulse(t) is the same as angularVelocity += t * inverseInertiaTensor. If you primarily care about changing the angular motion without regard for the inertia, you can just directly change the angular velocity too.Finally, I noticed that unlike v1, v2 has no ApplyAngularImpulse method. Is there a different built-in method that I'm not aware of? If not, what's the alternative?