Jump to content

Atlas + physics


titmael
 Share

Recommended Posts

Hi,

 

I have an image with multiple sprites, generated by TexturePacker, so I can animate my player easily.

 

But how could I create and load custom shapes for physics with PhysicsEditor for each sprite in the image ?

 

I thought about creating the image and then load in physicseditor every sprite individually to draw physics but texturepacker remove some white spaces in images to get a better sprite, so shape drawn in physicseditor will not fit the sprite. Don't know if I'm clear  :D

--> Will I have to crop every images to get something close to what TexturePacker will give me after creating the sprite ?

 

Thx

Link to comment
Share on other sites

Even though TexturePacker trims and crops the sprite, I think that's only for the purposes of the sprite sheet itself - when imported into the game, the sprites should take on their original size from when you exported them individually, so the physics shapes created in PhysicsEditor should in theory still fit. If they don't this is possibly a bug or an oversight.

Link to comment
Share on other sites

Even though TexturePacker trims and crops the sprite, I think that's only for the purposes of the sprite sheet itself - when imported into the game, the sprites should take on their original size from when you exported them individually

 

I would say no because I remember debugging and seeing textures sizes very differents but every images imported were same size. Maybe I checked the wrong property ?

 

In any case I decided to abandon this way to work because I don't want to lose to much time on it, maybe I'll try when my game is finished.

 

Thx for your answers guys ;)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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