One of the interesting concepts we've had to play with is translating motion from one direction to another. We've used this for a couple of different concepts, such as rotating a glider or allowing for midair adjustments.
The basic premise is that velocity should be maintained through the movement while allowing it to be affected by outside forces such as gravity and collision. The equation is pretty interesting.
Take your current velocity vector and add to that the vector that you're moving towards, then normalize it. This will give you a normalized vector that is between the two original vectors. After that, multiply the new vector by the old velocity vector's magnitude, so that no velocity is lost. This results in very satisfactory gliding physics, as when you pull up on the glider, you only lose velocity due to gravity and air drag.
No comments:
Post a Comment