Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | dbiton | |
Old Version | Published before Godot 3 was released. |
I noticed that the positions in godot 2D aren’t based on pixels (10,0 isnt 10 pixels far from 0,0), but on some arbitrary unit.
can godot be set so the unit of distance is in pixels? i.e, if i have an object moving in a speed of 20/second, it will move 20 pixels every second instead of 20 “units”, whatever they are.
If I understand right, the units are pixels, at least for the viewport.
You define a screen of 1280 pixels width, and something moving with a speed of 20 units/second (*delta) on x it should be around +(20,0) each second.
If the scaling deformed the screen reducing width at 640, it still will be 20 pixels/second for the game, while the screen will show 10.
eons | 2017-02-24 15:16