mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 18:56:55 +02:00
Removed debug + ignore frame 0
This commit is contained in:
parent
056cd0a4d1
commit
465b076998
2 changed files with 8 additions and 13 deletions
|
@ -646,7 +646,6 @@ void AvatarData::startPlaying(bool fromCurrentPosition) {
|
||||||
if (!_player) {
|
if (!_player) {
|
||||||
_player = PlayerPointer(new Player(this));
|
_player = PlayerPointer(new Player(this));
|
||||||
}
|
}
|
||||||
qDebug() << "AvatarData::startPlaying():" << fromCurrentPosition;
|
|
||||||
_player->startPlaying(fromCurrentPosition);
|
_player->startPlaying(fromCurrentPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -294,22 +294,18 @@ void Player::play() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
glm::vec3 positionOffset;
|
if (_currentFrame == 0) {
|
||||||
glm::quat rotationOffset;
|
// Don't play frame 0
|
||||||
float scaleOffset = 1.0f;
|
// only meant to store absolute values
|
||||||
|
return;
|
||||||
if (_currentFrame > 0) {
|
|
||||||
positionOffset = _startingPosition;
|
|
||||||
rotationOffset = _startingRotation;
|
|
||||||
scaleOffset = _startingScale;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_avatar->setPosition(positionOffset +
|
_avatar->setPosition(_startingPosition +
|
||||||
glm::inverse(_recording->getFrame(0).getRotation()) * rotationOffset *
|
glm::inverse(_recording->getFrame(0).getRotation()) * _startingRotation *
|
||||||
_recording->getFrame(_currentFrame).getTranslation());
|
_recording->getFrame(_currentFrame).getTranslation());
|
||||||
_avatar->setOrientation(rotationOffset *
|
_avatar->setOrientation(_startingRotation *
|
||||||
_recording->getFrame(_currentFrame).getRotation());
|
_recording->getFrame(_currentFrame).getRotation());
|
||||||
_avatar->setTargetScale(scaleOffset *
|
_avatar->setTargetScale(_startingScale *
|
||||||
_recording->getFrame(_currentFrame).getScale());
|
_recording->getFrame(_currentFrame).getScale());
|
||||||
_avatar->setJointRotations(_recording->getFrame(_currentFrame).getJointRotations());
|
_avatar->setJointRotations(_recording->getFrame(_currentFrame).getJointRotations());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue