private void interpolateObjects(SpriterKeyFrame firstFrame, SpriterKeyFrame secondFrame, float xOffset, float yOffset) {
		float[] newstuff;
		for (int i = 0; i < this.currenObjectsToDraw; i++) {

			SpriterObject obj1 = firstFrame.getObjects()[i];
			DrawInstruction dI = this.instructions[i];

			if (!obj1.isTransientObject()) {
				SpriterObject obj2 = null;
				boolean found = false;
				for(int j = 0; j < secondFrame.getObjects().length && !found; j++){
					found = secondFrame.getObjects()[j].getTimeline() == obj1.getTimeline();
					if(found) obj2 = secondFrame.getObjects()[j];
				}
				float x=obj1.getX(),y=obj1.getY(),scaleX=obj1.getScaleX(),scaleY=obj1.getScaleY(),rotation=obj1.getAngle(),alpha=obj1.getAlpha();
				if(obj2 != null){
					x = SpriterCalculator.calculateInterpolation(obj1.getX(), obj2.getX(), firstFrame.getStartTime(), secondFrame.getStartTime(), this.frame);
					y = SpriterCalculator.calculateInterpolation(obj1.getY(), obj2.getY(), firstFrame.getStartTime(), secondFrame.getStartTime(), this.frame);
					scaleX = SpriterCalculator.calculateInterpolation(obj1.getScaleX(), obj2.getScaleX(), firstFrame.getStartTime(), secondFrame.getStartTime(), this.frame);
					scaleY = SpriterCalculator.calculateInterpolation(obj1.getScaleY(), obj2.getScaleY(), firstFrame.getStartTime(), secondFrame.getStartTime(), this.frame);
					rotation = SpriterCalculator.calculateAngleInterpolation(obj1.getAngle(), obj2.getAngle(), firstFrame.getStartTime(), secondFrame.getStartTime(), this.frame);
					alpha = SpriterCalculator.calculateInterpolation(obj1.getAlpha(), obj2.getAlpha(), firstFrame.getStartTime(), secondFrame.getStartTime(), this.frame);
				}
				if(this.transitionFixed){
					this.lastFrame.getObjects()[i].setX(x);
					this.lastFrame.getObjects()[i].setY(y);
					this.lastFrame.getObjects()[i].setScaleX(scaleX);
					this.lastFrame.getObjects()[i].setScaleY(scaleY);
					this.lastFrame.getObjects()[i].setAngle(rotation);
					this.lastFrame.getObjects()[i].setAlpha(alpha);
					this.lastFrame.getObjects()[i].setId(obj1.getId());
					this.lastFrame.getObjects()[i].setTimeline((found) ? obj1.getTimeline() : -1);
					this.lastFrame.getObjects()[i].setFile(obj1.getFile());
					this.lastFrame.getObjects()[i].setFolder(obj1.getFolder());
					this.lastFrame.getObjects()[i].setPivotX(obj1.getPivotX());
					this.lastFrame.getObjects()[i].setPivotY(obj1.getPivotY());
					this.lastFrame.getObjects()[i].setSpin(obj1.getSpin());
				}
				
				if (obj1.getParent() != null) {
					rotation += tempBones[obj1.getParent()].getAngle();
					scaleX *= tempBones[obj1.getParent()].getScaleX();
					scaleY *= tempBones[obj1.getParent()].getScaleY();
					newstuff = SpriterCalculator.rotatePoint(tempBones[obj1.getParent()], x, y);
					x = newstuff[0];
					y = newstuff[1];
				}
				else{
					rotation += this.angle;
					scaleX *= this.scale;
					scaleY *= this.scale;
					newstuff = SpriterCalculator.rotatePoint(this.rootParent, x, y);
					x = newstuff[0];
					y = newstuff[1];
				}
				
				dI.ref.folder = obj1.getFolder();
				dI.ref.file = obj1.getFile();
				dI.x =  x*this.flipX+xOffset;
				dI.y =  y*this.flipY+yOffset;
				dI.scaleX =  scaleX*this.flipX;
				dI.scaleY =  scaleY*this.flipY;
				dI.pivotX =  obj1.getPivotX();
				dI.pivotY = obj1.getPivotY();
				dI.angle = rotation*this.flipX*this.flipY;
				dI.alpha = alpha;
					
			}
			else
			{
				dI.ref.folder = obj1.getFolder();
				dI.ref.file = obj1.getFile();
				dI.pivotX = obj1.getPivotX();
				dI.pivotY = obj1.getPivotY();
				dI.scaleX = obj1.getScaleX()*this.scale;
				dI.scaleY = obj1.getScaleY()*this.scale;
				dI.angle = obj1.getAngle()+this.angle;
				dI.alpha = obj1.getAlpha();
				newstuff = SpriterCalculator.rotatePoint(this.rootParent, dI.x, dI.y);
				dI.x = newstuff[0];
				dI.y = newstuff[1];
				dI.x = dI.x*this.flipX+xOffset;
				dI.y = dI.y*this.flipY+yOffset;
			}
		}
	}