mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 14:03:55 +02:00
Attachment translations in world space.
This commit is contained in:
parent
082ff760d6
commit
983a3af4b9
2 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue