mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 08:49:05 +02:00
Avatar pitch and roll cleared
This commit is contained in:
parent
93caa7e259
commit
afb03b3d2d
2 changed files with 11 additions and 11 deletions
|
@ -244,7 +244,7 @@ Item {
|
||||||
enabled: selected && pal.activeTab == "nearbyTab" && thisNameCard.userName !== "" && isPresent;
|
enabled: selected && pal.activeTab == "nearbyTab" && thisNameCard.userName !== "" && isPresent;
|
||||||
hoverEnabled: enabled
|
hoverEnabled: enabled
|
||||||
onClicked: {
|
onClicked: {
|
||||||
goToUserInDomain(thisNameCard.uuid, false);
|
goToUserInDomain(thisNameCard.uuid);
|
||||||
UserActivityLogger.palAction("go_to_user_in_domain", thisNameCard.uuid);
|
UserActivityLogger.palAction("go_to_user_in_domain", thisNameCard.uuid);
|
||||||
}
|
}
|
||||||
onEntered: {
|
onEntered: {
|
||||||
|
@ -339,7 +339,7 @@ Item {
|
||||||
enabled: selected && pal.activeTab == "nearbyTab" && thisNameCard.userName !== "" && isPresent;
|
enabled: selected && pal.activeTab == "nearbyTab" && thisNameCard.userName !== "" && isPresent;
|
||||||
hoverEnabled: enabled
|
hoverEnabled: enabled
|
||||||
onClicked: {
|
onClicked: {
|
||||||
goToUserInDomain(thisNameCard.uuid, false);
|
goToUserInDomain(thisNameCard.uuid);
|
||||||
UserActivityLogger.palAction("go_to_user_in_domain", thisNameCard.uuid);
|
UserActivityLogger.palAction("go_to_user_in_domain", thisNameCard.uuid);
|
||||||
}
|
}
|
||||||
onEntered: {
|
onEntered: {
|
||||||
|
@ -433,6 +433,7 @@ Item {
|
||||||
anchors.verticalCenter: nameCardRemoveConnectionImage.verticalCenter
|
anchors.verticalCenter: nameCardRemoveConnectionImage.verticalCenter
|
||||||
x: 240
|
x: 240
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
console.log("Vist user button clicked."); // Remove after debugging.
|
||||||
AddressManager.goToUser(thisNameCard.userName, false);
|
AddressManager.goToUser(thisNameCard.userName, false);
|
||||||
UserActivityLogger.palAction("go_to_user", thisNameCard.userName);
|
UserActivityLogger.palAction("go_to_user", thisNameCard.userName);
|
||||||
}
|
}
|
||||||
|
@ -597,7 +598,8 @@ Item {
|
||||||
// Note, however, that this script allows teleporting to a person in the air, while teleport.js is going to a grounded target.
|
// Note, however, that this script allows teleporting to a person in the air, while teleport.js is going to a grounded target.
|
||||||
// Position avatar 2 metres from the target in the direction that target avatar was facing.
|
// Position avatar 2 metres from the target in the direction that target avatar was facing.
|
||||||
MyAvatar.position = Vec3.sum(avatar.position, Vec3.multiplyQbyV(avatar.orientation, {x: 0, y: 0, z: -2}));
|
MyAvatar.position = Vec3.sum(avatar.position, Vec3.multiplyQbyV(avatar.orientation, {x: 0, y: 0, z: -2}));
|
||||||
// Rotate avatar on Y axis to face target avatar.
|
|
||||||
MyAvatar.orientation = Quat.multiply(avatar.orientation, {y: 1});
|
// Rotate avatar on Y axis to face target avatar and cancel out any inherited roll and pitch.
|
||||||
|
MyAvatar.orientation = Quat.cancelOutRollAndPitch(Quat.multiply(avatar.orientation, {y: 1}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -668,13 +668,11 @@ bool AddressManager::handleViewpoint(const QString& viewpointString, bool should
|
||||||
qCDebug(networking) << "Orientation parsed from lookup string is invalid. Will not use for location change.";
|
qCDebug(networking) << "Orientation parsed from lookup string is invalid. Will not use for location change.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (trigger == LookupTrigger::VisitUserFromPAL) {
|
emit locationChangeRequired(newPosition, orientationChanged,
|
||||||
qCDebug(networking) << "trigger is VisitUserFromPAL -- applying Quat.cancelOutRollAndPitch";
|
LookupTrigger::VisitUserFromPAL ? cancelOutRollAndPitch(newOrientation): newOrientation,
|
||||||
newOrientation = cancelOutRollAndPitch(newOrientation);
|
shouldFace
|
||||||
}
|
);
|
||||||
|
|
||||||
emit locationChangeRequired(newPosition, orientationChanged, newOrientation, shouldFace);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
qCDebug(networking) << "Could not jump to position from lookup string because it has an invalid value.";
|
qCDebug(networking) << "Could not jump to position from lookup string because it has an invalid value.";
|
||||||
|
|
Loading…
Reference in a new issue