Nope I think its the number of dimensions to the vector - but I could be wrong.
I've been implementing that sort of thing with UDTs cos I refuse to learn how to use the new commands
Without wishing to rehash the example directly.
Each of my objects properties is stored in a UDT which has a few sub-types so:
defines a threeD vector/position/whatever
TYPE ThreeD
x AS FLOAT
y AS FLOAT
z AS FLOAT
ENDTYPE
TYPE Object_t
pos AS ThreeD <- stores the 3d position in gamespace
vel AS ThreeD <- stores the current velocity in each axis (essentially a threeD vector)
ENDTYPE
Each turn through the game loop I calculate a vector representing all the forces acting on the object. Gravity would in thise case be represented by a vector pointing straight down with a fixed size.
So if these are stored in a variable acc which is a ThreeD type variable (acc for acceleration) then to add the forces acting on the ship to its current movement to give its new movement vector I do this:
So (assuming youve DIMed a Object(N) array at some point)
acc.x= (Insert sum of all forces here)
acc.y= (Insert sum of all forces here)-G <- gravity acting downwards
acc.z= (Insert sum of all forces here)
Then add this vector to the velocity vector
INC object(N).vel.x, acc.x
INC object(N).vel.y, acc.y
INC object(N).vel.z, acc.z
Then add the velocity to the position
INC object(N).pos.x, object(N).vel.x
INC object(N).pos.y, object(N).vel.y
INC object(N).pos.z, object(N).vel.z
And then update the objects position
POSITION OBJECT N, object(N).pos.x,object(N).pos.y,object(N).pos.z
Et viola vector addition and the worlds simplest physics engine.
Theres probably a much much simpler way to do this but I like this way