Hello. As everybody in this forum, I think JPCT is pretty impressive as a java game engine.
I would like to know if someone has some source code (or made some doc) explaining how to use MD2 file.
Thanks,
Manu
Code/docs for using jPCT's MD2-support or for writing your own loader in whatever language?
Code/docs for using jPCT's MD2-support
if you have some...
thanks
Should be quite easy in this case. You load and place the object like every other and animate it. Basically like this:
Object3D objAnim=Loader.loadMD2("md2/tris.md2", 1f);
TextureManager.getInstance().addTexture("myTexture", new Texture("md2/texture.jpg"));
objAnim.setTexture("myTexture");
objAnim.build();
theWorld.addObject(objAnim);
.
.
.
objAnim.animate(index, sequenceNumber);
Where index is a value between 0 and 1 and sequenceNumber the number of the animation sequence. Have a look at the Javadocs for more details about this.
Hope this helps.
Great :D
thanks you (for that ... and for JPCT in general)
manu