How set 2D velocity in pixels?

I understand that velocity is measured in meters/second. I suppose this is a remnant of Unity’s 3D roots where the world should operate independent of the scale of the viewport.

For 2D games this makes less sense, so I would like to calculate / set the speed of objects in pixels per second. How do I convert between the two?

When your sprites are imported there is a “Pixels Per Unit” property. That defines how many pixels go into a single Unity Unit. You should be able to use that value to map pixels to units.

For example, if your pixels per unit is 64, a 64x64 sprite would be 1x1 units. So if you want the sprite to move at 100 pixels per second, in units per second (i.e. meters per second) that would be 100/64 = 1.5625.

That said, I guess I’ve never seen anything that is specifying speeds in pixels. I personally would just make a normal sized sprite take up a single unit, pretend the unit is a meter, and set speeds and such using meters/second.