A folded camera comprising an actuator for rotating an optical path folding element, OPFE, that folds light from a first optical path substantially parallel to a yaw rotation axis, named X axis, to a second optical path substantially parallel to a Z axis, the Z axis being orthogonal to the X axis, wherein a pitch axis, named Y axis, is orthogonal to the X and Z axes, the actuator comprising: a) a first sub-assembly and a stationary sub-assembly, the first sub-assembly configured to rotate the OPFE relative to the stationary sub-assembly in an extended rotation range around the X axis with a trajectory having an arc projection in the Y-Z plane; and b) a sensing mechanism configured to sense rotation movement of the first sub-assembly around the X axis, comprising: i) a magnet attached to the first sub-assembly; and ii) a magnetic sensor attached to the stationary sub-assembly and configured to detect a magnetic flux of the magnet and to determine a relative shift between the magnet and the magnetic sensor based on change in the detected magnetic flux as the magnet rotates around the X axis with a trajectory having an arc projection in the Y-Z plane, the magnetic sensor being arranged at a distance from the magnet along the X axis direction, wherein the magnet is shaped such that a cross section of the magnet in a plane defined by the X axis and the Y axis has a width that increases from a point substantially at a center of the magnet towards each end of the magnet in the direction of the Y axis. that folds light from a first optical path substantially parallel to a yaw rotation axis, named X axis, to a second optical path substantially parallel to a Z axis, the Z axis being orthogonal to the X axis, wherein a pitch axis, named Y axis, is orthogonal to the X and Z axes, the actuator comprising: a) a first sub-assembly and a stationary sub-assembly, the first sub-assembly configured to rotate the OPFE relative to the stationary sub-assembly in an extended rotation range around the X axis with a trajectory having an arc projection in the Y-Z plane; and b) a sensing mechanism configured to sense rotation movement of the first sub-assembly around the X axis, comprising: i) a magnet attached to the first sub-assembly; and ii) a magnetic sensor attached to the stationary sub-assembly and configured to detect a magnetic flux of the magnet and to determine a relative shift between the magnet and the magnetic sensor based on change in the detected magnetic flux as the magnet rotates around the X axis with a trajectory having an arc projection in the Y-Z plane, the magnetic sensor being arranged at a distance from the magnet along the X axis direction, wherein the magnet is shaped such that a cross section of the magnet in a plane defined by the X axis and the Y axis has a width that increases from a point substantially at a center of the magnet towards each end of the magnet in the direction of the Y axis. a) a first sub-assembly and a stationary sub-assembly, the first sub-assembly configured to rotate the OPFE relative to the stationary sub-assembly in an extended rotation range around the X axis with a trajectory having an arc projection in the Y-Z plane; and b) a sensing mechanism configured to sense rotation movement of the first sub-assembly around the X axis, comprising: i) a magnet attached to the first sub-assembly; and ii) a magnetic sensor attached to the stationary sub-assembly and configured to detect a magnetic flux of the magnet and to determine a relative shift between the magnet and the magnetic sensor based on change in the detected magnetic flux as the magnet rotates around the X axis with a trajectory having an arc projection in the Y-Z plane, the magnetic sensor being arranged at a distance from the magnet along the X axis direction, wherein the magnet is shaped such that a cross section of the magnet in a plane defined by the X axis and the Y axis has a width that increases from a point substantially at a center of the magnet towards each end of the magnet in the direction of the Y axis. i) a magnet attached to the first sub-assembly; and ii) a magnetic sensor attached to the stationary sub-assembly and configured to detect a magnetic flux of the magnet and to determine a relative shift between the magnet and the magnetic sensor based on change in the detected magnetic flux as the magnet rotates around the X axis with a trajectory having an arc projection in the Y-Z plane, the magnetic sensor being arranged at a distance from the magnet along the X axis direction, wherein the magnet is shaped such that a cross section of the magnet in a plane defined by the X axis and the Y axis has a width that increases from a point substantially at a center of the magnet towards each end of the magnet in the direction of the Y axis.