sazoo
sazoo

Reputation: 127

camera rotates pointerlockcontrols

I have used mrdoob's PointerLockControls.js example for this project. Everything works fine until I change the

    camera.position.set(2, 2, 3 );

to this

    camera.position.set(1100, 150, -50 );

It seems to 'rotate' along the z axis instead of just looking.

Upvotes: 2

Views: 701

Answers (1)

WestLangley
WestLangley

Reputation: 104843

You need to do this:

controls.getObject().position.set( 1100, 150, -50 );

This is because of the clever way PointerLockControls handles camera movement.

Upvotes: 2

Related Questions