Skip to main content
briefly describe your changes (corrected spelling, fixed grammar, improved formatting)
Source Link
Maik Semder
  • 4.7k
  • 1
  • 27
  • 24

Can you show the code where you check if it has arrived? Do you make a floating point comparison using == ? That would not work, check for >= or <=

Edit: You are right, velocity * deltaTime * direction isn't correct, because the velocity should already be the direction, assuming that the velocity has been set properly. It should only be velocity * deltaTime, but I dont think thats the problem, since it actually arrived as your logging shows.

Edit: Instead of:

if(position.dist(start.position) == 0)

use something like:

if(position.dist(start.position) < 0.3)

Can you show the code where you check if it has arrived? Do you make a floating point comparison using == ? That would not work, check for >= or <=

Edit: You are right, velocity * deltaTime * direction isn't correct, because the velocity should already be the direction, assuming that the velocity has been set properly. It should only be velocity * deltaTime, but I dont think thats the problem, since it actually arrived as your logging shows.

Can you show the code where you check if it has arrived? Do you make a floating point comparison using == ? That would not work, check for >= or <=

Edit: You are right, velocity * deltaTime * direction isn't correct, because the velocity should already be the direction, assuming that the velocity has been set properly. It should only be velocity * deltaTime, but I dont think thats the problem, since it actually arrived as your logging shows.

Edit: Instead of:

if(position.dist(start.position) == 0)

use something like:

if(position.dist(start.position) < 0.3)
added 86 characters in body
Source Link
Maik Semder
  • 4.7k
  • 1
  • 27
  • 24

Can you show the code where you check if it has arrived? Do you make a floating point comparison using == ? That would not work, check for >= or <=

Edit: You are right, velocity * deltaTime * direction isn't correct, because the velocity should already be the direction, assuming that the velocity has been set properly. It should only be velocity * deltaTime, but I dont think thats the problem, since it actually arrived as your logging shows.

Can you show the code where you check if it has arrived? Do you make a floating point comparison using == ? That would not work, check for >= or <=

Edit: You are right, velocity * deltaTime * direction isn't correct, because the velocity should already be the direction, assuming that the velocity has been set properly. It should only be velocity * deltaTime

Can you show the code where you check if it has arrived? Do you make a floating point comparison using == ? That would not work, check for >= or <=

Edit: You are right, velocity * deltaTime * direction isn't correct, because the velocity should already be the direction, assuming that the velocity has been set properly. It should only be velocity * deltaTime, but I dont think thats the problem, since it actually arrived as your logging shows.

Source Link
Maik Semder
  • 4.7k
  • 1
  • 27
  • 24

Can you show the code where you check if it has arrived? Do you make a floating point comparison using == ? That would not work, check for >= or <=

Edit: You are right, velocity * deltaTime * direction isn't correct, because the velocity should already be the direction, assuming that the velocity has been set properly. It should only be velocity * deltaTime