Camera Rotation

I have a problem in my game, which is: I want to rotate the camera object based on my mouse position, but the problem is that if I use the “Pointer lock” extension, the rotation doesn’t work because there’s no way to make the cursor move, if I don’t use the extension, the rotation works, but if the cursor leaves or reaches the edge of the screen, the rotation stops because there is no way for the cursor to move, could someone help me?

ps: i’m not using a 3d object, i’m using a regular 2d object

This is what i have rn

Is this for 3d games? If it’s 2d why would you use pointer lock?

yes, it is for 3d games, im using WithTreeJS

I don’t exactly remember how to do it but here is an example that does this: 3d first person - a game example from the GDevelop game making app | GDevelop - also this doesn’t use withthreejs

i worked! Thank you very much :slight_smile:

1 Like