mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 15:13:41 +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;
|
||||
getJointPosition(parentIndex, parentPosition);
|
||||
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);
|
||||
|
|
|
@ -90,7 +90,6 @@ void Model::simulate(float deltaTime) {
|
|||
Model* model = new Model(this);
|
||||
model->init();
|
||||
model->setURL(attachment.url);
|
||||
model->setScale(attachment.scale);
|
||||
_attachments.append(model);
|
||||
}
|
||||
_resetStates = true;
|
||||
|
@ -111,8 +110,9 @@ void Model::simulate(float deltaTime) {
|
|||
getJointPosition(attachment.jointIndex, jointTranslation);
|
||||
getJointRotation(attachment.jointIndex, jointRotation);
|
||||
|
||||
model->setTranslation(jointTranslation + jointRotation * attachment.translation);
|
||||
model->setTranslation(jointTranslation + jointRotation * attachment.translation * _scale);
|
||||
model->setRotation(jointRotation * attachment.rotation);
|
||||
model->setScale(_scale * attachment.scale);
|
||||
|
||||
model->simulate(deltaTime);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue