terencechow Posted June 23, 2015 Share Posted June 23, 2015 I am trying to make a circle bigger on hover but I'm seeing the actual graphic move in position. Any idea why this is?var circle = new PIXI.Graphics();circle.beginFill(Math.random() * 0x808008 + 0x808080,0.9);circle.drawCircle(x,y,radius);circle.endFill();circle.interactive = true;circle.buttonMode = true;circle.hitArea = new PIXI.Circle(x,y,radius);stage.addChild(circle);circle.mouseover = mouseOverCallback;function mouseOverCallback(e){TweenMax.to(this.scale,1,{x:2,y:2});} Quote Link to comment Share on other sites More sharing options...
xerver Posted June 23, 2015 Share Posted June 23, 2015 Likely because the anchor is on the top-left of your object. Try circle.anchor.set(0.5) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.