Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Weird transforms


hungrybutterfly
 Share

Recommended Posts

I have a completed project that works on almost all devices. Yeah!

 

Except for Samsung Galaxy S3/Mini 4.1.2.  So far it's specifically that version of firmware.

 

On this device (and everything else) MOST of the time the game looks like this...

post-5642-0-37775800-1390912564.jpg

 

but SOMETIMES it looks like this...

post-5642-0-83121900-1390912591.jpg

 

Obviously something is going wrong in the context's transform. And it might happen anywhere in the game but it's always the rotation that's broken. Scaling and translation are always fine.

 

To be clear

* I never touch any transforms myself but I do some rotation and scaling of the book (which is the root sprite) by setting the .angle and .scale fields.

* I attach sprites to each other using addChild. 

* not everything is wrong in the same way (have the same bad rotation). You can see in the image different elements have a different bad rotation ie the text is more rotated that it's button.

* The buttons look weird because they're made of 3 separate images, left bit, middle bit, right bit.

* Once a sprite is created with a bad rotation it stays that way until it's destroyed.

* The sprites don't change their rotation over time. They stay as you see in the image.

 

One observation I've made is it SEEMS to be the deeper the sprite tree goes the worse the rotation error gets. So as an example the button graphic is attached to the paper and the button text is attached to the button graphic. The paper is rotated say 30 degrees, the button graphic is rotated 45 and the button text is rotated 60. This might suggest the same erroneous transform is being applied each time the renderer descends to a child.

 

Any clues or ANYTHING please suggest away cos I've got no idea.

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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