mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 06:03:26 +02:00
Android - Display Names - Use my avatar uuid directly when finding ray intersection
This commit is contained in:
parent
aaa6038d28
commit
e7abf3c7be
1 changed files with 1 additions and 11 deletions
|
@ -21,7 +21,6 @@ var TEXT_MARGIN = 0.025;
|
||||||
var HIDE_MS = 10000;
|
var HIDE_MS = 10000;
|
||||||
|
|
||||||
var currentTouchToAnalyze = null;
|
var currentTouchToAnalyze = null;
|
||||||
var rayExclusionList = []; // Updated at sessionUUID changes
|
|
||||||
|
|
||||||
var currentlyShownAvatar = {
|
var currentlyShownAvatar = {
|
||||||
avatarID: null,
|
avatarID: null,
|
||||||
|
@ -113,7 +112,7 @@ function touchEnd(event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var pickRay = Camera.computePickRay(event.x, event.y);
|
var pickRay = Camera.computePickRay(event.x, event.y);
|
||||||
var avatarRay = AvatarManager.findRayIntersection(pickRay, [], rayExclusionList);
|
var avatarRay = AvatarManager.findRayIntersection(pickRay, [], [MyAvatar.sessionUUID])
|
||||||
|
|
||||||
if (avatarRay.intersects) {
|
if (avatarRay.intersects) {
|
||||||
touchedAvatar(avatarRay.avatarID, AvatarManager.getAvatar(avatarRay.avatarID));
|
touchedAvatar(avatarRay.avatarID, AvatarManager.getAvatar(avatarRay.avatarID));
|
||||||
|
@ -124,10 +123,6 @@ function touchEnd(event) {
|
||||||
currentTouchToAnalyze = null;
|
currentTouchToAnalyze = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function excludeMyAvatar() {
|
|
||||||
rayExclusionList = [MyAvatar.sessionUUID];
|
|
||||||
}
|
|
||||||
|
|
||||||
var runAtLeastOnce = false;
|
var runAtLeastOnce = false;
|
||||||
|
|
||||||
function ending() {
|
function ending() {
|
||||||
|
@ -147,8 +142,6 @@ function ending() {
|
||||||
if (currentlyShownAvatar.avatar) {
|
if (currentlyShownAvatar.avatar) {
|
||||||
currentlyShownAvatar.avatar = null;
|
currentlyShownAvatar.avatar = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
MyAvatar.sessionUUIDChanged.disconnect(excludeMyAvatar);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
|
@ -161,9 +154,6 @@ function init() {
|
||||||
ending();
|
ending();
|
||||||
});
|
});
|
||||||
|
|
||||||
rayExclusionList = [MyAvatar.sessionUUID];
|
|
||||||
MyAvatar.sessionUUIDChanged.connect(excludeMyAvatar);
|
|
||||||
|
|
||||||
runAtLeastOnce = true;
|
runAtLeastOnce = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue