mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 18:56:55 +02:00
Add menu item that disables adjusting eyelids to follow pupil
Developer > Avatar > Disable Eyelid Adjustment
This commit is contained in:
parent
ce1cc83a9e
commit
e9b3d48165
3 changed files with 6 additions and 0 deletions
|
@ -444,6 +444,7 @@ Menu::Menu() {
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::RenderFocusIndicator, 0, false);
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::RenderFocusIndicator, 0, false);
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::ShowWhosLookingAtMe, 0, false);
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::ShowWhosLookingAtMe, 0, false);
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::FixGaze, 0, false);
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::FixGaze, 0, false);
|
||||||
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::DisableEyelidAdjustment, 0, false);
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu,
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu,
|
||||||
MenuOption::Connexion,
|
MenuOption::Connexion,
|
||||||
0, false,
|
0, false,
|
||||||
|
|
|
@ -168,6 +168,7 @@ namespace MenuOption {
|
||||||
const QString DecreaseAvatarSize = "Decrease Avatar Size";
|
const QString DecreaseAvatarSize = "Decrease Avatar Size";
|
||||||
const QString DeleteBookmark = "Delete Bookmark...";
|
const QString DeleteBookmark = "Delete Bookmark...";
|
||||||
const QString DisableActivityLogger = "Disable Activity Logger";
|
const QString DisableActivityLogger = "Disable Activity Logger";
|
||||||
|
const QString DisableEyelidAdjustment = "Disable Eyelid Adjustment";
|
||||||
const QString DisableLightEntities = "Disable Light Entities";
|
const QString DisableLightEntities = "Disable Light Entities";
|
||||||
const QString DisableNackPackets = "Disable Entity NACK Packets";
|
const QString DisableNackPackets = "Disable Entity NACK Packets";
|
||||||
const QString DiskCacheEditor = "Disk Cache Editor";
|
const QString DiskCacheEditor = "Disk Cache Editor";
|
||||||
|
|
|
@ -277,6 +277,10 @@ void Head::calculateMouthShapes() {
|
||||||
void Head::applyEyelidOffset(glm::quat headOrientation) {
|
void Head::applyEyelidOffset(glm::quat headOrientation) {
|
||||||
// Adjusts the eyelid blendshape coefficients so that the eyelid follows the iris as the head pitches.
|
// Adjusts the eyelid blendshape coefficients so that the eyelid follows the iris as the head pitches.
|
||||||
|
|
||||||
|
if (Menu::getInstance()->isOptionChecked(MenuOption::DisableEyelidAdjustment)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
glm::quat eyeRotation = rotationBetween(headOrientation * IDENTITY_FRONT, getLookAtPosition() - _eyePosition);
|
glm::quat eyeRotation = rotationBetween(headOrientation * IDENTITY_FRONT, getLookAtPosition() - _eyePosition);
|
||||||
eyeRotation = eyeRotation * glm::angleAxis(safeEulerAngles(headOrientation).y, IDENTITY_UP); // Rotation w.r.t. head
|
eyeRotation = eyeRotation * glm::angleAxis(safeEulerAngles(headOrientation).y, IDENTITY_UP); // Rotation w.r.t. head
|
||||||
float eyePitch = safeEulerAngles(eyeRotation).x;
|
float eyePitch = safeEulerAngles(eyeRotation).x;
|
||||||
|
|
Loading…
Reference in a new issue