#Matrix Coords Rotation

7 messages · Page 1 of 1 (latest)

polar depot
#

what you need is to read the damn docs
there is player.matrixWorld.decompose(positionVector, rotationQuaternion, scaleVector)

short thicket
#

A couple of things about your code: (1) you don't need to call getWorldPosition every time; (2) you don't need to set every element of the camera's position separately. This could be written slightly shorter but this is likely clearest:

const world_position = new THREE.Vector3();
camera.position.copy(player.getWorldPosition(world_position));
short thicket
#

Oh, I see. In that case:

const camera_offset = new THREE.Vector3(0, 5, 0);
const world_position = new THREE.Vector3();
camera.position.copy(player.getWorldPosition(world_position).add(camera_offset));
polar depot
polar depot
valid dagger
#

Bro ok?

short thicket