1
Support / Re: Animate character
« on: March 07, 2007, 11:25:31 am »
Ok thanks, and when i create a keyframe does a message appears in the console (becaus i Have no messages fot it)?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
theWorld.addObject(body);
animation = new Animation(6);
int marcheseq = animation.createSubSequence("marche");
body.build();
marche1.build();
marche2.build();
marche3.build();
marche4.build();
marche5.build();
marche6.build();
animation.addKeyFrame(marche1.getMesh());
animation.addKeyFrame(marche2.getMesh());
animation.addKeyFrame(marche3.getMesh());
animation.addKeyFrame(marche4.getMesh());
animation.addKeyFrame(marche5.getMesh());
animation.addKeyFrame(marche6.getMesh());
body.setAnimationSequence(animation);
Loader.setVertexOptimization(false);
while (!exit)
{
buffer.clear();
theWorld.renderScene(buffer);
theWorld.draw(buffer);
buffer.update();
buffer.display(frameGraphics);
body.animate(x, marcheseq);
if (x>6) {
anim=0;
}
else
{
anim+=1;
}
}
}