Post
by craft » 27 Mar 2010, 12:39
as much as i know and i don't know much either, you'll most often be adding the force vectors to the velocity vectors, which then are added to your position vectors. But it might depend a lot on what you're doing and how you're doing it.
so say you have a gravity force of g = [0, -9.8, 0], you have a v = [0,1,0] velocity and p = [0,0,0] position, at frame 1.
at frame 2 you'll have g=[0,-9.8,0], v=[0,-8.8,0], p=[0,-8.8,0]...
but say you have a drag force... you COULD calculate a drag force vector out of the velocity vector and then add that drag to the velocity... but it'd be easier to simply multiply the v vector by a scalar (.. say 0.9 ), to get the same effect.
now imagine you have a wirlwiind effect... you might as well just create a rotation out of an axis and angle(derived from the whirwind strength and mass of your object) and rotate the vector by this rotation.