mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:43:50 +02:00
Fixes duplicate target overlays for teleporter, make sure to delete overlay before creating one
This commit is contained in:
parent
dc6ab167e4
commit
11b461a730
1 changed files with 4 additions and 0 deletions
|
@ -88,6 +88,7 @@ function Teleporter() {
|
|||
|
||||
this.createTargetOverlay = function() {
|
||||
|
||||
_this.deleteTargetOverlay();
|
||||
var targetOverlayProps = {
|
||||
url: TARGET_MODEL_URL,
|
||||
dimensions: TARGET_MODEL_DIMENSIONS,
|
||||
|
@ -191,6 +192,9 @@ function Teleporter() {
|
|||
};
|
||||
|
||||
this.deleteTargetOverlay = function() {
|
||||
if (this.targetOverlay === null) {
|
||||
return;
|
||||
}
|
||||
Overlays.deleteOverlay(this.targetOverlay);
|
||||
this.intersection = null;
|
||||
this.targetOverlay = null;
|
||||
|
|
Loading…
Reference in a new issue