16
Support / Re: Tile XY Position not precise
« on: September 02, 2015, 06:23:07 pm »
It's usually a good idea to set your PPM to 100, that plays nicer with Unity's physics systems. In Unity the default is 1 unit = 1 meter, which then works out to be 100 pixels per meter. That gives the physics system a bit more of a normalized world scale. At 1 pixel per meter, a sprite that is 32 pixels high is now 32 meters tall, which will create some large scales that the default settings don't handle too well (eg. Min Penetration, Velocity Threshold).
If you do use a PPM of 100, any time you want to move a unity a certain number of pixels, just divide by 100 (so 32 pixels becomes 0.32f). Also it's not a good idea to change this value half-way through development, it will throw off your layouts quite a bit.
Extra threads on the topic:
http://2dtoolkit.com/forum/index.php/topic,3498.msg20148.html#msg20148
https://www.reddit.com/r/Unity2D/comments/2aqg9d/what_pixel_per_meter_should_i_develop_the_game_at/
If you do use a PPM of 100, any time you want to move a unity a certain number of pixels, just divide by 100 (so 32 pixels becomes 0.32f). Also it's not a good idea to change this value half-way through development, it will throw off your layouts quite a bit.
Extra threads on the topic:
http://2dtoolkit.com/forum/index.php/topic,3498.msg20148.html#msg20148
https://www.reddit.com/r/Unity2D/comments/2aqg9d/what_pixel_per_meter_should_i_develop_the_game_at/