A system for determining a distance to an object by range gating, the system comprising: - a solid-state light source arranged for projecting a pattern of spots, preferably discrete spots, of light towards the object in a sequence of pulses, preferably a periodically repeated sequence of pulses; - a detector comprising an imaging array, the detector being configured for detecting light representing the pattern of spots as reflected by the object in synchronization with said sequence of pulses; and - processing means configured to calculate the distance to the object as a function of exposure values generated by said pixels in response to said detected light; wherein said imaging array comprises a plurality of pixels, each of said pixels comprising: - a first charge storage well and a second charge storage well for accumulating electrical charges representative of amounts of light reflected by said object and impinging on said pixel during respective sets of exposure intervals, and a third charge storage well ; - wherein said first charge storage well has a charge capacity that is at least 50% greater than a charge capacity of said second charge storage well ; and - wherein said third charge storage well has a smaller charge storage capacity than said first charge storage well and said second charge storage well ; wherein the pixels of the imaging array are configured to generate said exposure values by accumulating, for all pulses of said sequence, a first amount of electrical charge representative of a first amount of light reflected by said object during a first predetermined time window and a second electrical charge representative of a second amount of light reflected by said object during a second predetermined time window, said second predetermined time window occurring after said first predetermined time window, whereby said solid-state light source is in its "ON" state during the first time window and in its "OFF" state during the second time window ; and wherein the detecting of the first amount of light and the detecting of said second amount of light occurs at said first charge storage well and at said second charge storage well , respectively. - a solid-state light source arranged for projecting a pattern of spots, preferably discrete spots, of light towards the object in a sequence of pulses, preferably a periodically repeated sequence of pulses; - a detector comprising an imaging array, the detector being configured for detecting light representing the pattern of spots as reflected by the object in synchronization with said sequence of pulses; and - processing means configured to calculate the distance to the object as a function of exposure values generated by said pixels in response to said detected light; - a first charge storage well and a second charge storage well for accumulating electrical charges representative of amounts of light reflected by said object and impinging on said pixel during respective sets of exposure intervals, and a third charge storage well ; - wherein said first charge storage well has a charge capacity that is at least 50% greater than a charge capacity of said second charge storage well ; and - wherein said third charge storage well has a smaller charge storage capacity than said first charge storage well and said second charge storage well ; <EOS>