Improve 2d snapping
Partially revert change allowing sprite get_rect snapping to be controlled by `pixel_snap` again rather than `transform_snap` (to prevent breaking compatibility). Adds a final `use_camera_snap` project setting to allow snapping viewports as in reduz original PR.
This commit is contained in:
@ -60,6 +60,7 @@ private:
|
||||
float _time_scale;
|
||||
bool _pixel_snap;
|
||||
bool _snap_2d_transforms;
|
||||
bool _snap_2d_viewports;
|
||||
uint64_t _physics_frames;
|
||||
float _physics_interpolation_fraction;
|
||||
|
||||
@ -109,6 +110,7 @@ public:
|
||||
|
||||
_FORCE_INLINE_ bool get_use_pixel_snap() const { return _pixel_snap; }
|
||||
bool get_snap_2d_transforms() const { return _snap_2d_transforms; }
|
||||
bool get_snap_2d_viewports() const { return _snap_2d_viewports; }
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
_FORCE_INLINE_ void set_editor_hint(bool p_enabled) { editor_hint = p_enabled; }
|
||||
|
||||
Reference in New Issue
Block a user