Use MyAvatar.goToLocation in radar teleport.

Use MyAvatar.goToLocation in radar teleport to prevent synchronization issues that make it fail occasionally when directly modifying its world position. It will work just as teleport.js does.
This commit is contained in:
Cristian Duarte 2018-04-09 16:24:03 -03:00 committed by GitHub
parent 35e888977b
commit d5c252c9ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,11 +46,11 @@ var uniqueColor;
function moveTo(position) {
if (radar) {
MyAvatar.position = position;
MyAvatar.goToLocation(position, false);
Camera.position = {
x : MyAvatar.position.x,
x : position.x,
y : radarHeight,
z : MyAvatar.position.z
z : position.z
};
}
}