mirror of
https://github.com/lubosz/overte.git
synced 2025-04-14 14:46:55 +02:00
making requested changes
This commit is contained in:
parent
618a1d5b83
commit
8e600adf1e
1 changed files with 3 additions and 23 deletions
|
@ -414,32 +414,12 @@ EntityItemProperties Overlays::convertOverlayToEntityProperties(QVariantMap& ove
|
|||
}
|
||||
|
||||
if (add && !overlayProps.contains("rotation") && !overlayProps.contains("localRotation")) {
|
||||
glm::quat rotation;
|
||||
overlayProps["rotation"] = quatToVariant(glm::angleAxis(-(float)M_PI_2, rotation * Vectors::RIGHT) * rotation);
|
||||
overlayProps["rotation"] = quatToVariant(glm::angleAxis(-(float)M_PI_2, Vectors::RIGHT));
|
||||
} else if (overlayProps.contains("rotation")) {
|
||||
glm::quat rotation;
|
||||
{
|
||||
auto iter = overlayProps.find("rotation");
|
||||
if (iter != overlayProps.end()) {
|
||||
rotation = quatFromVariant(iter.value());
|
||||
}
|
||||
}
|
||||
glm::quat rotation = quatFromVariant(overlayProps["rotation"]);
|
||||
overlayProps["rotation"] = quatToVariant(glm::angleAxis(-(float)M_PI_2, rotation * Vectors::RIGHT) * rotation);
|
||||
|
||||
if (overlayProps.contains("localRotation")) {
|
||||
auto iter = overlayProps.find("localRotation");
|
||||
if (iter != overlayProps.end()) {
|
||||
overlayProps.erase(iter);
|
||||
}
|
||||
}
|
||||
} else if (overlayProps.contains("localRotation")) {
|
||||
glm::quat rotation;
|
||||
{
|
||||
auto iter = overlayProps.find("localRotation");
|
||||
if (iter != overlayProps.end()) {
|
||||
rotation = quatFromVariant(iter.value());
|
||||
}
|
||||
}
|
||||
glm::quat rotation = quatFromVariant(overlayProps["localRotation"]);
|
||||
overlayProps["localRotation"] = quatToVariant(glm::angleAxis(-(float)M_PI_2, rotation * Vectors::RIGHT) * rotation);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue