Scale fixes.

This commit is contained in:
Andrzej Kapolka 2013-10-23 16:15:03 -07:00
parent a9df8a6b29
commit 240f65b7c5
2 changed files with 4 additions and 3 deletions

View file

@ -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);

View file

@ -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);
}