Thank you !
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.
Show posts MenuQuoteERROR: The sizes of the Animation's Meshes (68) and the object's Mesh (1445) don't match!
public Helicopter(float coordX, float coordY, float coordZ) {
super(coordX, coordY, coordZ);
Object3D objs[] = Loader.load3DS("models" + File.separatorChar
+ "helicopter.3ds", 7f);
this.model = objs[0];
for (int i = 1; i < objs.length; i++)
this.model = Object3D.mergeObjects(this.model, objs[i]);
Texture tex = new Texture("models" + File.separatorChar + "gunmap.png");
TextureManager.getInstance().addTexture("gunmap", tex);
this.model.setTexture("gunmap");
this.model.build();
this.model.getMesh().compress();
this.model.translate((float)(coordX*pbm), -1 * (float)(coordY*pbm), (float)(coordZ*pbm));
Object3D[] animArray = new Object3D[8];
for(int i=0;i<animArray.length;i++) {
objs[0].rotateY((float)Math.PI / animArray.length);
Object3D obj = objs[0].cloneObject();
obj.rotateMesh();
animArray[i] = obj;
}
Animation anim=new Animation(animArray.length);
anim.createSubSequence("rotating blade");
for (int i=0; i<animArray.length; i++) {
animArray[i].build();
anim.addKeyFrame(animArray[i].getMesh());
}
this.model.setAnimationSequence(anim);
}
Object3D objs[] = Loader.load3DS("models" + File.separatorChar
+ "balloon.3ds", 1.5f);
this.model = objs[0];
for(int i=1; i<objs.length; i++) {
this.model = Object3D.mergeObjects(this.model, objs[i]);
objs[i].build();
}
this.model.rotateX(-3.14f / 2.0f);
this.model.build();
Object3D[] objs = Loader.load3DS("models" + File.separatorChar + "balloon.3ds", 1);
this.model = objs[0];
for(int i=1; i<objs.length; i++)
this.model.addChild(objs[i]);
model.build();
Page created in 0.023 seconds with 12 queries.