How to determine the direction and change the angle of view according to two points in 3D?

First of all, there is an initial location point point1 = new THREE.Vector3 in

3D, and there is also a corresponding viewpoint now. When I randomly click on other points, I get the second point point2 = new THREE.Vector3 (x2Magnegy y2jinz2). Now I want to change the viewpoint according to the connection between the two points as the direction, mainly to change the position and target. Now I want to ask you how to find target.

Mar.30,2022

I'm not sure what you want to do
, but if you just want the camera to look in a direction parallel to two points

camera.position.x = point2.x - point1.x
camera.position.y = point2.y - point1.y
camera.position.z = point2.z - point1.z

that's fine

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37530-2b8cf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37530-2b8cf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?