Repository: godotengine/godot
File: editor/scene/3d/node_3d_editor_plugin.cpp (C++)

Code before:
			if (!plane.intersects_ray(ray_pos, ray, &intersection)) {
				break;
			}

			Vector3 click;
			if (!plane.intersects_ray(_edit.click_ray_pos, _edit.click_ray, &click)) {
				break;
			}

			Vector3 motion = intersection - click;
			if (_edit.plane != TRANSFORM_VIEW) {
				if (!plane_mv) {
					motion = motion_mask.dot(motion) * motion_mask;
				}
			}

			if (_edit.snap || spatial_editor->is_snap_enabled()) {
				snap = spatial_editor->get_translate_snap();
			}
			Vector3 motion_snapped = motion;
			motion_snapped.snapf(snap);
			// TRANSLATORS: Refers to changing the position of a node in the 3D editor.
			set_message(vformat(TTR("Translating: (%s, %s, %s)"),
					String::num(motion_snapped.x, snap_step_decimals),
					String::num(motion_snapped.y, snap_step_decimals),
					String::num(motion_snapped.z, snap_step_decimals)));
			if (local_coords) {
				motion = spatial_editor->get_gizmo_transform().basis.inverse().xform(motion);
			}

			apply_transform(motion, snap);
		} break;

		case TRANSFORM_ROTATE: {
			Plane plane;
			if (camera->get_projection() == Camera3D::PROJECTION_PERSPECTIVE) {
				Vector3 cam_to_obj = _edit.center - _get_camera_position();
				if (!cam_to_obj.is_zero_approx()) {
					plane = Plane(cam_to_obj.normalized(), _edit.center);
				} else {
					plane = Plane(_get_camera_normal(), _edit.center);
				}
			} else {
				plane = Plane(_get_camera_normal(), _edit.center);
			}

			if (_edit.is_trackball) {
				Vector2 motion_delta = _edit.mouse_pos - _edit.original_mouse_pos;
				real_t sensitivity = TRACKBALL_SENSITIVITY * EDSCALE;
				Vector2 rotation_input = motion_delta * sensitivity;


Review comment (suggestion):
```suggestion
			set_message(vformat(TTR("Translating: %s"), vformat("%.*v", snap_step_decimals, motion_snapped)));
```

Code after:

			Vector3 motion = intersection - click;
			if (_edit.plane != TRANSFORM_VIEW) {
				if (!plane_mv) {
					motion = motion_mask.dot(motion) * motion_mask;
				}
			}

			if (_edit.snap || spatial_editor->is_snap_enabled()) {
				snap = spatial_editor->get_translate_snap();
			}
			Vector3 motion_snapped = motion;
			motion_snapped.snapf(snap);
			// TRANSLATORS: Refers to changing the position of a node in the 3D editor.
			set_message(vformat(TTR("Translating: %s"), vformat("%.*v", snap_step_decimals, motion_snapped)));
			if (local_coords) {
				motion = spatial_editor->get_gizmo_transform().basis.inverse().xform(motion);
			}

			apply_transform(motion, snap);
		} break;

		case TRANSFORM_ROTATE: {
			Plane plane;
			if (camera->get_projection() == Camera3D::PROJECTION_PERSPECTIVE) {
				Vector3 cam_to_obj = _edit.center - _get_camera_position();
				if (!cam_to_obj.is_zero_approx()) {
					plane = Plane(cam_to_obj.normalized(), _edit.center);
				} else {
					plane = Plane(_get_camera_normal(), _edit.center);
				}
			} else {
				plane = Plane(_get_camera_normal(), _edit.center);
			}

			if (_edit.is_trackball) {
				Vector2 motion_delta = _edit.mouse_pos - _edit.original_mouse_pos;
				real_t sensitivity = TRACKBALL_SENSITIVITY * EDSCALE;
				Vector2 rotation_input = motion_delta * sensitivity;

				Transform3D cam_transform = to_camera_transform(cursor);
				Vector3 cam_right = cam_transform.basis.get_column(0).normalized();
				Vector3 cam_up = cam_transform.basis.get_column(1).normalized();
				Vector3 rotation_axis = cam_up * rotation_input.x + cam_right * rotation_input.y;

				real_t rotation_angle = rotation_axis.length();
				if (rotation_angle > 0.0f) {
					rotation_axis /= rotation_angle;

					bool snapping = _edit.snap || spatial_editor->is_snap_enabled();
					if (snapping) {