mirror of
https://github.com/overte-org/overte.git
synced 2025-04-17 14:46:40 +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;
|
||||
hoverEnabled: enabled
|
||||
onClicked: {
|
||||
goToUserInDomain(thisNameCard.uuid, false);
|
||||
goToUserInDomain(thisNameCard.uuid);
|
||||
UserActivityLogger.palAction("go_to_user_in_domain", thisNameCard.uuid);
|
||||
}
|
||||
onEntered: {
|
||||
|
@ -339,7 +339,7 @@ Item {
|
|||
enabled: selected && pal.activeTab == "nearbyTab" && thisNameCard.userName !== "" && isPresent;
|
||||
hoverEnabled: enabled
|
||||
onClicked: {
|
||||
goToUserInDomain(thisNameCard.uuid, false);
|
||||
goToUserInDomain(thisNameCard.uuid);
|
||||
UserActivityLogger.palAction("go_to_user_in_domain", thisNameCard.uuid);
|
||||
}
|
||||
onEntered: {
|
||||
|
@ -433,6 +433,7 @@ Item {
|
|||
anchors.verticalCenter: nameCardRemoveConnectionImage.verticalCenter
|
||||
x: 240
|
||||
onClicked: {
|
||||
console.log("Vist user button clicked."); // Remove after debugging.
|
||||
AddressManager.goToUser(thisNameCard.userName, false);
|
||||
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.
|
||||
// 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}));
|
||||
// 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.";
|
||||
}
|
||||
}
|
||||
|
||||
if (trigger == LookupTrigger::VisitUserFromPAL) {
|
||||
qCDebug(networking) << "trigger is VisitUserFromPAL -- applying Quat.cancelOutRollAndPitch";
|
||||
newOrientation = cancelOutRollAndPitch(newOrientation);
|
||||
}
|
||||
|
||||
emit locationChangeRequired(newPosition, orientationChanged, newOrientation, shouldFace);
|
||||
|
||||
emit locationChangeRequired(newPosition, orientationChanged,
|
||||
LookupTrigger::VisitUserFromPAL ? cancelOutRollAndPitch(newOrientation): newOrientation,
|
||||
shouldFace
|
||||
);
|
||||
|
||||
} else {
|
||||
qCDebug(networking) << "Could not jump to position from lookup string because it has an invalid value.";
|
||||
|
|
Loading…
Reference in a new issue