Issue with the SourceY being different in some of the sprites

Hi guys,

Very new to TP and am currently evaluating it at the moment. Looks like a great product.
But I am having an issue when I publish the sprite sheet…

TP creates a data file, and in the data file some of the Y values are different as shown below

  
 {  
 -- dog\_wakesup\_00020  
 x=600,  
 y=0,  
 width=200,  
 height=86,  
  
 sourceX = 82,  
 sourceY = 630,  
 sourceWidth = 1024,  
 sourceHeight = 768  
 },  
 {  
 -- dog\_wakesup\_00021  
 x=200,  
 y=88,  
 width=200,  
 height=88,  
  
 sourceX = 82,  
 sourceY = 628,  
 sourceWidth = 1024,  
 sourceHeight = 768  
 },  
  

As you can see the sourceY is different. If I leave the sourceX and Y in the data file, the animation looks great. But because I want to move the animation around the screen using the X and Y properties I take out the SourceX and SourceY from the file. As soon as I do this, the animation gitteres a bit.

Is there a setting I am missing I have to set up before I export? any help would be appreciated.

Thanks

Vik [import]uid: 67619 topic_id: 34453 reply_id: 334453[/import]

Hi Vik,
Once you have the sprite on the screen, moving it around by x and y values is the same as any display object, with the x/y being (by default) the center of the sprite. When you’re looking at the data TexturePacker exports, the “x” and “y” values pertain to where those frames reside on the image sheet… they aren’t related to the position of the sprite on the screen once it’s output as a display object. Does that clarify things a bit?

Best regards,
Brent [import]uid: 200026 topic_id: 34453 reply_id: 137002[/import]

Brent,

so what does the SourceX and SourceY attributes do?

also the last post I did on https://developer.coronalabs.com/forum/2012/12/30/dynamic-sprite-sheets
when I try to center the sprite on the screen, it just puts it in the botton left of the screen…
Vik [import]uid: 67619 topic_id: 34453 reply_id: 137010[/import]

Hi Vik,
Once you have the sprite on the screen, moving it around by x and y values is the same as any display object, with the x/y being (by default) the center of the sprite. When you’re looking at the data TexturePacker exports, the “x” and “y” values pertain to where those frames reside on the image sheet… they aren’t related to the position of the sprite on the screen once it’s output as a display object. Does that clarify things a bit?

Best regards,
Brent [import]uid: 200026 topic_id: 34453 reply_id: 137002[/import]

Brent,

so what does the SourceX and SourceY attributes do?

also the last post I did on https://developer.coronalabs.com/forum/2012/12/30/dynamic-sprite-sheets
when I try to center the sprite on the screen, it just puts it in the botton left of the screen…
Vik [import]uid: 67619 topic_id: 34453 reply_id: 137010[/import]