Movement Vectors - Down To Earth (3)

Some Code:


  // Acc/De-cellerate
  if(up)   speed = speed + 0.01;
  if(down) speed = speed - 0.01;
  if(left) // Turn left
      direction = (new SFRotation(0,1,0, 0.1)).
                   multVec(direction);
  if(right) // Turn right
      direction = (new SFRotation(0,1,0,-0.1)).
                   multVec(direction);
  position = position + direction*speed;