Original Post
hey, i'm making a simple physics engine and stuff, and when i try to make an animate function, for some reason it doesn't animate. here's the code:
CVector position1 = CVector(-5,-5,0);
CVector velocity1 = CVector(10,10,0);
CVector acceleration1 = CVector(0,-9.8,0);
void animate(float deltaTime, CVector position,CVector velocity,CVector acceleration)
{
position += velocity * deltaTime;
velocity += acceleration * deltaTime;
}
and in my loop, here's how i call it:
animate(newDeltaTime,position1,velocity1,acceleration1);
and that's it. when i have just deltaTime as an argument it works, but i want this to work for whatever position i want, not just for one vector. any reason to see why it's not working? thanks --nathan