I have been trying to figure out how to determine the distance between vector A and vector B, then use the result to determine if it is within a certain range in world space.
I have experimented and tried many various attempts for some time but..
Here's an example of code representing what my overall goal would be (1 of many failed attempts)
float distanceToDestination = localPlayer.getTransformedCenter().calcSub(dest).length(); // XXX
if (distanceToDestination <= 100) {
// Here, I would translate the local player in my game <distanceToDestination> world units.
}
I've tried a lot of different solutions and I'm not really that great with these type of mathematics so any help is very much appreciated