mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 06:57:37 +02:00
Scale fixes.
This commit is contained in:
parent
a9df8a6b29
commit
240f65b7c5
2 changed files with 4 additions and 3 deletions
|
@ -66,7 +66,8 @@ bool SkeletonModel::render(float alpha) {
|
||||||
glm::vec3 parentPosition;
|
glm::vec3 parentPosition;
|
||||||
getJointPosition(parentIndex, parentPosition);
|
getJointPosition(parentIndex, parentPosition);
|
||||||
const float STICK_RADIUS = BALL_RADIUS * 0.5f;
|
const float STICK_RADIUS = BALL_RADIUS * 0.5f;
|
||||||
Avatar::renderJointConnectingCone(parentPosition, position, STICK_RADIUS, STICK_RADIUS);
|
Avatar::renderJointConnectingCone(parentPosition, position, STICK_RADIUS * _owningAvatar->getScale(),
|
||||||
|
STICK_RADIUS * _owningAvatar->getScale());
|
||||||
}
|
}
|
||||||
|
|
||||||
Model::render(alpha);
|
Model::render(alpha);
|
||||||
|
|
|
@ -90,7 +90,6 @@ void Model::simulate(float deltaTime) {
|
||||||
Model* model = new Model(this);
|
Model* model = new Model(this);
|
||||||
model->init();
|
model->init();
|
||||||
model->setURL(attachment.url);
|
model->setURL(attachment.url);
|
||||||
model->setScale(attachment.scale);
|
|
||||||
_attachments.append(model);
|
_attachments.append(model);
|
||||||
}
|
}
|
||||||
_resetStates = true;
|
_resetStates = true;
|
||||||
|
@ -111,8 +110,9 @@ void Model::simulate(float deltaTime) {
|
||||||
getJointPosition(attachment.jointIndex, jointTranslation);
|
getJointPosition(attachment.jointIndex, jointTranslation);
|
||||||
getJointRotation(attachment.jointIndex, jointRotation);
|
getJointRotation(attachment.jointIndex, jointRotation);
|
||||||
|
|
||||||
model->setTranslation(jointTranslation + jointRotation * attachment.translation);
|
model->setTranslation(jointTranslation + jointRotation * attachment.translation * _scale);
|
||||||
model->setRotation(jointRotation * attachment.rotation);
|
model->setRotation(jointRotation * attachment.rotation);
|
||||||
|
model->setScale(_scale * attachment.scale);
|
||||||
|
|
||||||
model->simulate(deltaTime);
|
model->simulate(deltaTime);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue