Attachment translations in world space.

This commit is contained in:
Andrzej Kapolka 2014-05-06 11:50:37 -07:00
parent 082ff760d6
commit 983a3af4b9
2 changed files with 2 additions and 1 deletions

View file

@ -369,7 +369,7 @@ void Avatar::simulateAttachments(float deltaTime) {
glm::quat jointRotation;
if (_skeletonModel.getJointPosition(jointIndex, jointPosition) &&
_skeletonModel.getJointRotation(jointIndex, jointRotation)) {
model->setTranslation(jointPosition + jointRotation * attachment.translation * _skeletonModel.getScale());
model->setTranslation(jointPosition + jointRotation * attachment.translation * _scale);
model->setRotation(jointRotation * attachment.rotation);
model->setScale(_skeletonModel.getScale() * attachment.scale);
model->simulate(deltaTime);

View file

@ -78,6 +78,7 @@ void AttachmentsDialog::addAttachment(const AttachmentData& data) {
static QDoubleSpinBox* createTranslationBox(AttachmentsDialog* dialog, float value) {
QDoubleSpinBox* box = new QDoubleSpinBox();
box->setSingleStep(0.01);
box->setMinimum(-FLT_MAX);
box->setMaximum(FLT_MAX);
box->setValue(value);