mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +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;
|
glm::quat jointRotation;
|
||||||
if (_skeletonModel.getJointPosition(jointIndex, jointPosition) &&
|
if (_skeletonModel.getJointPosition(jointIndex, jointPosition) &&
|
||||||
_skeletonModel.getJointRotation(jointIndex, jointRotation)) {
|
_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->setRotation(jointRotation * attachment.rotation);
|
||||||
model->setScale(_skeletonModel.getScale() * attachment.scale);
|
model->setScale(_skeletonModel.getScale() * attachment.scale);
|
||||||
model->simulate(deltaTime);
|
model->simulate(deltaTime);
|
||||||
|
|
|
@ -78,6 +78,7 @@ void AttachmentsDialog::addAttachment(const AttachmentData& data) {
|
||||||
|
|
||||||
static QDoubleSpinBox* createTranslationBox(AttachmentsDialog* dialog, float value) {
|
static QDoubleSpinBox* createTranslationBox(AttachmentsDialog* dialog, float value) {
|
||||||
QDoubleSpinBox* box = new QDoubleSpinBox();
|
QDoubleSpinBox* box = new QDoubleSpinBox();
|
||||||
|
box->setSingleStep(0.01);
|
||||||
box->setMinimum(-FLT_MAX);
|
box->setMinimum(-FLT_MAX);
|
||||||
box->setMaximum(FLT_MAX);
|
box->setMaximum(FLT_MAX);
|
||||||
box->setValue(value);
|
box->setValue(value);
|
||||||
|
|
Loading…
Reference in a new issue