TheLastBanana wrote:
You may want to set the third argument of SceneMan:ShortestDistance to true. Otherwise, it won't account for wrapping over the map's seam.
No. The API documentation is very clear on this:
TFM wrote:
ShortestDistance
Calculates the shortest distance between two points in scene coordinates, taking into account all wrapping and out of bounds of the two points.
Arguments:
The two Vector coordinates of the two positions to find the shortest distance between.
Whether to check if the passed in points are outside the scene, and to wrap them if they are.
Return value:
The resulting vector screen shows the shortest distance, spanning over wrapping borders etc. Basically the ideal pos2 - pos1.
So you usually don't want to set the third argument to true, because that will move e.g. Vector(0,-100) to somewhere inside the scene. It also means that using SceneMan.SceneWrapsX as the third argument, as you sometimes see people do, does not have the effect intended by the modder.