proyb2 Posted July 24, 2015 Share Posted July 24, 2015 Could I rotate only Ellipse without affected Line position and angle?var graphics = game.add.graphics(100,200);graphics.lineStyle(2,0x33FF00,1);graphics.moveTo(0,0);graphics.lineTo(20,199);graphics.beginFill(0x000000);graphics.angle=-45;graphics.drawEllipse(0, 0, 100, 200);graphics.endFill(); If using sprite to rotate, the graphics edge and line appear to jerky, how to make it smooth?sprite = game.add.sprite(30, 100, graphics.generateTexture());sprite.y=280sprite.x=178sprite.angle=-17 Link to comment Share on other sites More sharing options...
wayfinder Posted July 24, 2015 Share Posted July 24, 2015 If you want to rotate the ellipse separately, you can set up separate graphics (and sprite) objects. Link to comment Share on other sites More sharing options...
proyb2 Posted July 24, 2015 Author Share Posted July 24, 2015 If you want to rotate the ellipse separately, you can set up separate graphics (and sprite) objects. Any way to merge 2 sprites into one sprite? Link to comment Share on other sites More sharing options...
wayfinder Posted July 24, 2015 Share Posted July 24, 2015 You could use sprite1.addChild(sprite2), that way the second sprite's position would be slaved to the first one's. Careful though, the second sprite's position will now be relative to sprite1! Link to comment Share on other sites More sharing options...
proyb2 Posted July 24, 2015 Author Share Posted July 24, 2015 You could use sprite1.addChild(sprite2), that way the second sprite's position would be slaved to the first one's. Careful though, the second sprite's position will now be relative to sprite1! Ah, good idea. Sorry, the last question if the graphics could be convert to bitmapdata which can be further draw on anything and finally convert to sprite. I think there's a missing tutorials for this use case. Link to comment Share on other sites More sharing options...
Recommended Posts