   lerp'ing between two points with discreet steps
  Ok, so I'm trying to lerp between two points on a waypoint path, but for some reason I can't get it to work :/ Any advice/help/solution would be greatly appreciated!//Initializationcurrent_node = path->getStartNode();fullDist = siut::simd::standard::length(current_node->getNextNode()->getPos() - current_node->getPos());siut::simd::Vec3f dPos = current_node->getPos() - go->getPos();go->translate(dPos);//descreet updatevoid PathWalker::Update(double dt){if(pathFinished)return;//Interpolate towards goal positionfloat partDist = siut::simd::standard::length(current_node->getNextNode()->getPos() - go->getPos());if(partDist < 0.5f){std::cout << "Reached node!" << std::endl;current_node = current_node->getNextNode();fullDist = siut::simd::standard::length(current_node->getNextNode()->getPos() - current_node->getPos());return;}partDist = partDist - 0.5f; //stepfloat u = ((fullDist - partDist)/fullDist)*(float)dt;siut::simd::Vec3f newPos = siut::simd::standard::lerp(current_node->getPos(), current_node->getNextNode()->getPos(), u);siut::simd::Vec3f dPos = newPos - go->getPos();go->translate(dPos);if(current_node == path->getEndNode())pathFinished = true;}The updating of the position is staying quite stable around very small changes in value no matter what the step size is strangely enough. I just can't wrap my head around what I'm doing wrong here!Anyone?   
  Your code is extremely confusing, or just completely missing.Here's a simple way to look at lerping:value( t ) = A + (B-A) * tB should be the destination node, A should be where you started (not where you currently are). Lastly value( t ) will represent your current position at time t. If you increment t from 0 to 1, at any interval, it will work its way from A to B.Note: Value( t ) is never reintroduced to the equation. You may be using your current position as the value of A which would give you a non linear interpolation towards the target.i'd recommend that you use:using namespace siut:simd; in your cpp for files, good god. Also, is simd an interest at this point, if you're still learning how to lerp?Also, use a common lerp function for good practice:template< typename Type >Type Lerp( const Type& a, const Type& b, float t ){ return a + (b-a) * t; }Vec PlayersPosition( float t ) { return Lerp( prevNodePos, nextNodePos, t ); }To get a t you can use basically inverse pathematics. The above demonstration would be forward pathematics. If you reparameterize t by the segment length, you can step t at a constant world speed.   ;  Thank you for such a quick answer.The lerp function in that library is as follows: vec3 p = lerp(vec3 a, vec3 b, float t)At initialization I set the A position from the path by doing getStartNode. Each node in the path knows which node is next in the path, so I can immediately find out what the next position, B, in the path is and calculate the distance:fullDist = length(B - A)I then position my game object at the start of the path withdPos = A - gameObject->getPos()gameObject->translate(dPos); //Equivalent to gameObject->setPos(A) I guessThat's all I do for initialization. I do not know how many steps I must take to make it from A to B, so I thought that checking first the full distance between A and B and checking that with the distance between gameObject's current position and B should give me the current descreet step between A and B that the game object is currently at.From there the idea was that I should be able to do a simple step, adding a small value to this result, which should make the object move towards B, such that:GOtoBdist -= 0.5f; //step 0.5t = ((AtoBdist - GOtoBdist)/AtoBdist)*dt;Maybe the problem is right there? That I should do the step like:t = ((AtoBdist - GOtoBdist)/AtoBdist) + 0.5*dt;Hmm...Anyway, I then do the lerp for A and B with t step, and the result is not what I had hoped for.In the "if" scope, I hope to catch when the game object has approximately arrived at the next node path (B), so that I can make A = B and then B = A->getNext();  Ok, so I did the small fix I mentioned in my last pos:t = ((AtoBdist - GOtoBdist)/AtoBdist) + 0.1*dt;and that seems to have fixed the actual stepping, but my object disappears, so I have a bug somewhere.I can do:A = path->getStartNode();B = A->getNext();AtoBdist = length(B->getPos() - A->getPos());Vec3f pos = A->getPos() - go->getPos();go->translate(pos);This moves the go (game object) from it's spawned position and onto the position of the start node in the path.But if I follow this up with the following code:float GOtoBdist = length(B->getPos() - go->getPos());float t = ((AtoBdist - GOtoBdist)/AtoBdist) + 0.1f;Vec3f newPos = lerp(A->getPos(), B->getPos(), t);pos = newPos - go->getPos();go->translate(pos);If I check the go position after translation here, the new position is correct. So this works, but I have a bug somewhere that makes my object disappear for some odd reason when I do that last snippet of code. It will not disappear if I only do the first snippet of code, which is kind of strange...   