mirror of
https://github.com/overte-org/overte.git
synced 2025-08-12 09:34:16 +02:00
working on imporving soft-entities
This commit is contained in:
parent
6fa3446c57
commit
e1a7f9bfb8
2 changed files with 9 additions and 5 deletions
|
@ -359,21 +359,26 @@ void Avatar::relayJointDataToChildren() {
|
|||
index++;
|
||||
if (modelEntity->getRelayParentJoints()) {
|
||||
QVector<glm::quat> jointRotations;
|
||||
QVector<bool> jointRotationsSet;
|
||||
QVector<glm::vec3> jointTranslations;
|
||||
QVector<bool> jointSet;
|
||||
QStringList modelJointNames = modelEntity->getJointNames();
|
||||
QStringList avatarJointNames = getJointNames();
|
||||
foreach (const QString& jointName, modelJointNames) {
|
||||
bool containsJoint = avatarJointNames.contains(jointName);
|
||||
if (!containsJoint) {
|
||||
return;
|
||||
qDebug() << "Warning: Parent does not have joint -" << jointName;
|
||||
continue;
|
||||
}
|
||||
int jointIndex = getJointIndex(jointName);
|
||||
int modelJointIndex = modelEntity->getJointIndex(jointName);
|
||||
jointRotationsSet.append(true);
|
||||
jointSet.append(true);
|
||||
jointRotations.append(getJointRotation(jointIndex));
|
||||
jointTranslations.append(getJointTranslation(jointIndex));
|
||||
}
|
||||
modelEntity->setJointRotationsSet(jointRotationsSet);
|
||||
modelEntity->setJointRotationsSet(jointSet);
|
||||
//modelEntity->setJointTranslationsSet(jointSet);
|
||||
modelEntity->setJointRotations(jointRotations);
|
||||
//modelEntity->setJointTranslations(jointTranslations);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1205,7 +1205,6 @@ void ModelEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& sce
|
|||
if (entity->_relayParentJoints) {
|
||||
ModelPointer model = entity->getModel();
|
||||
if (model && model->isLoaded()) {
|
||||
qDebug() << "relaying joints";
|
||||
entity->copyAnimationJointDataToModel();
|
||||
model->simulate(0.0f);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue