Function for a still camera? WEBGL

Hello! I started programming about a month ago. Anyways I was working on a first-person demo and decided to make it so the mouse would move the camera. To test it out I used cam.pan and made it follow mouseX and mouseY. So the camera is panning and being controlled I was wondering if there is a function to set the camera still and make it still follow mouseX and mouseY?

let cam;

function setup() {
  createCanvas(400, 400, WEBGL);
   cam = createCamera();

function draw() {
      translate(35, 440,-300);

Can you elaborate? Iā€™m not sure I understand the behavior you want.

1 Like