kdorje / min3d

Automatically exported from code.google.com/p/min3d
0 stars 0 forks source link

MD2 anim loop interpolation error #105

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. ogre = parser.getParsedAnimationObject(); 
//"com.example.min3dengine:raw/ogro"
2. ogre.play("run", true);
3. scene.addChild(ogre);

What is the expected output? What do you see instead?
There is a bug in the in the between-frames interpolation alg. For example:
The "com.example.min3dengine:raw/ogro" RUN loop animation should be played from 
frame 40 to 45 and the last frame should be interpolated between 45 and 40 (not 
45 and 46 as it is now).

What version of the product are you using? On what operating system?
mac os, the latest version from svn

Please provide any additional information below.

In AnimatedObject3d in update() function I have added:

if(currentFrameName != null && !currentFrameName.equals(nextFrame.getName()))
{
   nextFrame = frames[loopStartIndex]; // <-- close the loop
}

Original issue reported on code.google.com by rkozik.utp@gmail.com on 26 Dec 2013 at 4:08