mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 14:30:35 +02:00
Merge pull request #4022 from ZappoMan/animationFrameIndex
fix one more case of animaiton stutter
This commit is contained in:
commit
4f06c271c0
1 changed files with 1 additions and 5 deletions
|
@ -18,7 +18,6 @@
|
|||
#include "EntityTreeElement.h"
|
||||
#include "ModelEntityItem.h"
|
||||
|
||||
|
||||
const QString ModelEntityItem::DEFAULT_MODEL_URL = QString("");
|
||||
const QString ModelEntityItem::DEFAULT_ANIMATION_URL = QString("");
|
||||
const float ModelEntityItem::DEFAULT_ANIMATION_FRAME_INDEX = 0.0f;
|
||||
|
@ -343,9 +342,6 @@ QVector<glm::quat> ModelEntityItem::getAnimationFrame() {
|
|||
Animation* myAnimation = getAnimation(_animationURL);
|
||||
QVector<FBXAnimationFrame> frames = myAnimation->getFrames();
|
||||
int frameCount = frames.size();
|
||||
if (_animationLoop.getMaxFrameIndexHint() != frameCount) {
|
||||
_animationLoop.setMaxFrameIndexHint(frameCount);
|
||||
}
|
||||
if (frameCount > 0) {
|
||||
int animationFrameIndex = (int)(glm::floor(getAnimationFrameIndex())) % frameCount;
|
||||
if (animationFrameIndex < 0 || animationFrameIndex > frameCount) {
|
||||
|
|
Loading…
Reference in a new issue