Topic: Teleport and moving the map
Hi!
We are using a basic teleport script to move across te map (specifically VRTK Basic Teleport), but the problem is that the player literally teleports to that position on the plane and the image on the plane itself does not move. This means that eventually the player ends up at the border of the plane.
Attached are two images to show what I mean.
Is there an easy way to compensate the map so that it takes the current player position and resets itself so that position is now the middle? Or should I try to modify the teleport script to do this instead?
I have already tried to do this instead of moving the player on teleport:
double lng, lat;
OnlineMaps map = OnlineMaps.instance;
map.projection.TileToCoordinates(target.position.x, target.position.z, map.zoom, out lng, out lat);
map.SetPosition(lng, lat);
But this gives a strange result, the lng, lat is not as expected.