thanks for answering
it is quite clear now, but i still have troubles with animation.
i try to get it work with a box,but there is something wrong
is it basically correct?
thanks
hannes
it is quite clear now, but i still have troubles with animation.
i try to get it work with a box,but there is something wrong
is it basically correct?
Code Select
private void init3DStuff()
{
....
obj = new Object3D(Primitives.getBox(10, 1));
....
anim = new Animation(2);
....
anim.setInterpolationMethod(Animation.LINEAR);
anim.addKeyFrame(obj.cloneObject().getMesh());
obj.translate(10, 10, 0);
anim.addKeyFrame(obj.cloneObject().getMesh());
obj.setAnimationSequence(anim);
obj.build();
world.addObject(obj);
}
private void gameLoop() {
......
while (!exit) {
....
if(anim_count <=1)
{
anim_count += 0.1f;
obj.animate(anim_count, 0);
}
else {
count = 0;
obj.animate(anim_count, 1);
}
....
.....
try {
Thread.sleep(200);
} catch (InterruptedException e) {
}
}
System.exit(0);
}
thanks
hannes