mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 02:56:50 +02:00
Handle geometric offsets in FBX mesh extents calculations
This commit is contained in:
parent
d334f1c35c
commit
09b92b93aa
1 changed files with 5 additions and 0 deletions
|
@ -272,6 +272,11 @@ glm::mat4 getGlobalTransform(const QMultiMap<QString, QString>& _connectionParen
|
||||||
const FBXModel& model = models.value(nodeID);
|
const FBXModel& model = models.value(nodeID);
|
||||||
globalTransform = glm::translate(model.translation) * model.preTransform * glm::mat4_cast(model.preRotation *
|
globalTransform = glm::translate(model.translation) * model.preTransform * glm::mat4_cast(model.preRotation *
|
||||||
model.rotation * model.postRotation) * model.postTransform * globalTransform;
|
model.rotation * model.postRotation) * model.postTransform * globalTransform;
|
||||||
|
if (model.hasGeometricOffset) {
|
||||||
|
glm::mat4 geometricOffset = createMatFromScaleQuatAndPos(model.geometricScaling, model.geometricRotation, model.geometricTranslation);
|
||||||
|
globalTransform = globalTransform * geometricOffset;
|
||||||
|
}
|
||||||
|
|
||||||
if (mixamoHack) {
|
if (mixamoHack) {
|
||||||
// there's something weird about the models from Mixamo Fuse; they don't skin right with the full transform
|
// there's something weird about the models from Mixamo Fuse; they don't skin right with the full transform
|
||||||
return globalTransform;
|
return globalTransform;
|
||||||
|
|
Loading…
Reference in a new issue