jaqob Posted February 17, 2016 Share Posted February 17, 2016 I know this has been discussed before, but all old discussions indicates that it was a bug that should have been corrected. How is pivot supposed to work? According to the documentation: pivot The pivot point of the displayObject that it rotates around To me, that sounds like it should NOT affect the position of the object, but it seems like it does. See this short example:http://jsfiddle.net/8opfx16g/7/ Needless to say, this is causing some problems with collision detection, among other things. Is there a way to rotate around the center, without moving the actual object? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 17, 2016 Share Posted February 17, 2016 Yeah, that's a bug, but its Graphics object bug. Thank you! Quote Link to comment Share on other sites More sharing options...
d13 Posted February 20, 2016 Share Posted February 20, 2016 Hi Jaqob, Don't worry, you're in good company! This is not a bug - it's the way Pivot is supposed to work, and there have been endless discussions about this: http://www.html5gamedevs.com/topic/19776-why-should-pivot-work-like-this/#comment-112116 Many people, like me, think this is bad behaviour and that pivot shouldn't affect positions. The documentation is actually wrong - pivot is apparently intended to change the position. Quote Link to comment Share on other sites More sharing options...
xerver Posted February 20, 2016 Share Posted February 20, 2016 Yeah right now it effects the entire transform, I had a proposal to fix this but I never had the time to implement it: https://github.com/pixijs/pixi.js/issues/997 Quote Link to comment Share on other sites More sharing options...
d13 Posted February 21, 2016 Share Posted February 21, 2016 8 hours ago, xerver said: I had a proposal to fix this but I never had the time to implement it It was a great idea, hopefully it will show up in v.4 Quote Link to comment Share on other sites More sharing options...
xerver Posted February 21, 2016 Share Posted February 21, 2016 Just now, d13 said: It was a great idea, hopefully it will show up in v.4 Unfortunately, I don't have time to work on this next iteration of pixi So its up to Mat if he decides to do it or not. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 21, 2016 Share Posted February 21, 2016 @d13 It wont show in v4 but may be in v4.1 Quote Link to comment Share on other sites More sharing options...
d13 Posted February 21, 2016 Share Posted February 21, 2016 3 hours ago, ivan.popelyshev said: @d13 It wont show in v4 but may be in v4.1 I'm so glad it's still on the cards! If there was only one thing I could change about Pixi, it would be to implement Chad's proposal to fix pivot. It's been my single biggest headache working with Pixi over the last 3 years. Quote Link to comment Share on other sites More sharing options...
d13 Posted February 21, 2016 Share Posted February 21, 2016 Just now, d13 said: I'm so glad it's still on the cards! If there was only one thing I could change about Pixi, it would be to implement Chad's proposal to fix pivot. It's been my single biggest headache working with Pixi over the last 3 years. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 21, 2016 Share Posted February 21, 2016 1 minute ago, d13 said: I'm so glad it's still on the cards! If there was only one thing I could change about Pixi, it would be to implement Chad's proposal to fix pivot. It's been my single biggest headache working with Pixi over the last 3 years. My biggest headache was about Texture frame/crop/trim, and I changed that in v4. I'm all hands up for Chad's proposal. Quote Link to comment Share on other sites More sharing options...
d13 Posted February 21, 2016 Share Posted February 21, 2016 By the way, you guys in the Pixi dev team are doing a fantastic job - thanks so much!!! Quote Link to comment Share on other sites More sharing options...
jaqob Posted February 22, 2016 Author Share Posted February 22, 2016 Thanks for your answers. Now that I understand a bit more about why I have been able to work around it. As d13 says, thanks for your great sw! 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.