diff --git a/ofxBvh/src/ofxBvh.cpp b/ofxBvh/src/ofxBvh.cpp index f999869..c6db7c8 100644 --- a/ofxBvh/src/ofxBvh.cpp +++ b/ofxBvh/src/ofxBvh.cpp @@ -143,9 +143,7 @@ void ofxBvh::update() { need_update = true; - currentFrame = frames[index]; - - if (index >= frames.size()) + if (index >= frames.size()) { if (loop) play_head = 0; @@ -155,6 +153,10 @@ void ofxBvh::update() if (play_head < 0) play_head = 0; + + index = getFrame(); + currentFrame = frames[index]; + } }