nickanastasov Posted April 18, 2015 Share Posted April 18, 2015 Hello developers,I want to ask you a question ( it could be silly but I can't find anything that works in the forum or other articles ). I want to rotate one line around a circle and I will attach an image to understand me perfectly what i mean. So i searched a lot about rotation of sprites with Phaser but I can't find a working example or a working function that will do what I want. I'm pretty sure my thing is not a big deal so it should be available to be done. I hope you can help me,Nick. Link to comment Share on other sites More sharing options...
Lauromine Posted April 18, 2015 Share Posted April 18, 2015 Hi, I think you should change the pivot position of your rotating object so that the pivot and the center of your circle will be the same point and then, rotate this object (the line on your picture). You can use :yourDisplayObject.pivot.set(yourX, yourY);(Doc : http://www.goodboydigital.com/pixijs/docs/classes/DisplayObject.html#property_pivot ) to set the pivot coordinates. Lauro. Link to comment Share on other sites More sharing options...
Recommended Posts