Yes. The webcam is part of the devices that Moodle uses to ensure effective operations. The settings allow Moodle to access the webcam and facilitate its operations. The webcam will play a vital role in ensuring that the PC's physical activities are under the check.
As such, you will minimize the chances of cheating and preserve the credibility of the test. Typically, a camera is part of the success of your Moodle activity.