mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 01:03:57 +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) {
|
||||
_player = PlayerPointer(new Player(this));
|
||||
}
|
||||
qDebug() << "AvatarData::startPlaying():" << fromCurrentPosition;
|
||||
_player->startPlaying(fromCurrentPosition);
|
||||
}
|
||||
|
||||
|
|
|
@ -294,22 +294,18 @@ void Player::play() {
|
|||
return;
|
||||
}
|
||||
|
||||
glm::vec3 positionOffset;
|
||||
glm::quat rotationOffset;
|
||||
float scaleOffset = 1.0f;
|
||||
|
||||
if (_currentFrame > 0) {
|
||||
positionOffset = _startingPosition;
|
||||
rotationOffset = _startingRotation;
|
||||
scaleOffset = _startingScale;
|
||||
if (_currentFrame == 0) {
|
||||
// Don't play frame 0
|
||||
// only meant to store absolute values
|
||||
return;
|
||||
}
|
||||
|
||||
_avatar->setPosition(positionOffset +
|
||||
glm::inverse(_recording->getFrame(0).getRotation()) * rotationOffset *
|
||||
_avatar->setPosition(_startingPosition +
|
||||
glm::inverse(_recording->getFrame(0).getRotation()) * _startingRotation *
|
||||
_recording->getFrame(_currentFrame).getTranslation());
|
||||
_avatar->setOrientation(rotationOffset *
|
||||
_avatar->setOrientation(_startingRotation *
|
||||
_recording->getFrame(_currentFrame).getRotation());
|
||||
_avatar->setTargetScale(scaleOffset *
|
||||
_avatar->setTargetScale(_startingScale *
|
||||
_recording->getFrame(_currentFrame).getScale());
|
||||
_avatar->setJointRotations(_recording->getFrame(_currentFrame).getJointRotations());
|
||||
|
||||
|
|
Loading…
Reference in a new issue