itween rotate issues

I’m having a problem with itween’s rotateBy function.

I have three reels on a slot machine, and a variable for each reel (x, y + z). Z will always be > y, and y will always be > x.

Variables x, y, z set how much to rotate reel 1, 2 and 3 by, respectively.

Instead of rotating about their centers, they seem to rotate about some other weird axis instead, as you can see in the pics below:

I’ve got the math right for how much to rotate each reel by, but obviously something I’ve either done, or missed is causing the reels to rotate around something else. Any help would be really appreciated, or if there’s a better way to do this I’d love to know.

Also, about every other time I run it, it crashes Unity iPhone.

//now we start spinning
		var re1 = GameObject.FindWithTag("reel1");
		var re2 = GameObject.FindWithTag("reel2");
		var re3 = GameObject.FindWithTag("reel3");
		
		while(z>0){
			
			if(z>5){
				iTween.rotateBy(re3,{"x":5, "delay":0.1});
					z -=5;
				}
				else{
				iTween.rotateBy(re3,{"x":z, "delay":0.1});
					z = 0;
				}
			}
			while(y>0){
				if(y>5){
				iTween.rotateBy(re2,{"x":5, "delay":0.1});
					y -=5;
				}
				else{
				iTween.rotateBy(re2,{"x":y, "delay":0.1});
					y = 0;
				}
			}
						
			
			while(x>0){
				if(x>5){
				iTween.rotateBy(re1,{"x":5, "delay":0.1});
					x -=5;
				}
				else{
				iTween.rotateBy(re1,{"x":x, "delay":0.1});
					x = 0;
				}
			}

I’ve also tried changing the itween lines to:

re3.transform.Rotate(Vector3.right*5);

and it still does the same thing, rotating in a wide circle, instead of spinning around it’s axis.

did you find a solution to this? having the same problem. :?

It turned out that iTween was working fine, but the reels had imported with their pivot centers off-center - you need to set it up in Unity so that the handles are shown at their pivot centers, instead of the object center to verify this.

When I did that, the handles were all outside of the reels, and below; since this is what they’d rotate about, instead of around its axis, the reels would appear to loop in and out.

To fix it I copied and pasted the reels one at a time from the old 3d doc (Strata 3d) to a new document, centered them in the strata world, and exported it. From there, re-import into Unity and their centers were all where they should have been.

So it was really an export issue from Strata 3D, and not iTween or Unity.

Did you made these yourself on 3DS Max or whatever ? If yes, check if the pivots axis are centered on the object.

Thanks for the tip. it was precisely that.
I also found it worked better for me when I added zero values to the x / z values as I was only using y axis