mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 06:38:29 +02:00
cleanup
This commit is contained in:
parent
ffbfc89e99
commit
9afc4d0c26
1 changed files with 6 additions and 9 deletions
|
@ -124,7 +124,7 @@ function Teleporter() {
|
||||||
// Entities.deleteEntity(_this.targetEntity);
|
// Entities.deleteEntity(_this.targetEntity);
|
||||||
Overlays.deleteOverlay(_this.targetOverlay);
|
Overlays.deleteOverlay(_this.targetOverlay);
|
||||||
this.enableGrab();
|
this.enableGrab();
|
||||||
|
|
||||||
this.updateConnected = false;
|
this.updateConnected = false;
|
||||||
Script.setTimeout(function() {
|
Script.setTimeout(function() {
|
||||||
inTeleportMode = false;
|
inTeleportMode = false;
|
||||||
|
@ -274,16 +274,16 @@ function Teleporter() {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.updateTargetOverlay = function(intersection) {
|
this.updateTargetOverlay = function(intersection) {
|
||||||
this.intersection=intersection;
|
this.intersection = intersection;
|
||||||
var position = {
|
var position = {
|
||||||
x: intersection.intersection.x,
|
x: intersection.intersection.x,
|
||||||
y: intersection.intersection.y+TARGET_MODEL_DIMENSIONS.y,
|
y: intersection.intersection.y + TARGET_MODEL_DIMENSIONS.y,
|
||||||
z: intersection.intersection.z
|
z: intersection.intersection.z
|
||||||
}
|
}
|
||||||
Overlays.editOverlay(this.targetOverlay, {
|
Overlays.editOverlay(this.targetOverlay, {
|
||||||
position: position
|
position: position
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.disableGrab = function() {
|
this.disableGrab = function() {
|
||||||
|
@ -299,11 +299,8 @@ function Teleporter() {
|
||||||
print('TELEPORT CALLED');
|
print('TELEPORT CALLED');
|
||||||
|
|
||||||
var offset = getAvatarFootOffset();
|
var offset = getAvatarFootOffset();
|
||||||
|
|
||||||
// _this.intersectionPosition.y+=offset;
|
_this.intersection.intersection.y += offset;
|
||||||
// print('OFFSET IS::: ' + JSON.stringify(offset))
|
|
||||||
// print('TELEPORT POSITION IS:: ' + JSON.stringify(_this.intersectionPosition));
|
|
||||||
_this.intersection.intersection.y+=offset;
|
|
||||||
MyAvatar.position = _this.intersection.intersection;
|
MyAvatar.position = _this.intersection.intersection;
|
||||||
this.exitTeleportMode();
|
this.exitTeleportMode();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue