Jump to content

How is pivot supposed to work?


jaqob
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...