test quternion
This commit is contained in:
parent
78abb52a1d
commit
85fd0bd1c0
|
@ -264,9 +264,9 @@ watch(() => sidebar.is_open && sidebar.id_clickable, () => {
|
|||
controls_targetto.value = target_vector;
|
||||
|
||||
const quaternion = new Quaternion();
|
||||
quaternion.setFromAxisAngle(new Vector3(1, 0, 0), -15 * (Math.PI / 180));
|
||||
// quaternion.setFromAxisAngle(new Vector3(0, 1, 0), -25 * (Math.PI / 180));
|
||||
// quaternion.setFromAxisAngle(new Vector3(0, 0, 1), 10 * (Math.PI / 180));
|
||||
quaternion.setFromAxisAngle(new Vector3(1, 0, 0), -45 * 3 * (Math.PI / 180));
|
||||
quaternion.setFromAxisAngle(new Vector3(0, 1, 0), -45 * 3 * (Math.PI / 180));
|
||||
// quaternion.setFromAxisAngle(new Vector3(0, 0, 1), -15 * (Math.PI / 180));
|
||||
|
||||
camera_rotatetoto.value = quaternion
|
||||
camera_moveto.value = target_vector;
|
||||
|
@ -310,7 +310,7 @@ onAfterRender(() => {
|
|||
// (controls.value as any).minDistance = targetDistance.min;
|
||||
}
|
||||
}
|
||||
if (!camera_moveto.value && !controls_targetto.value && camera_rotatetoto.value) {
|
||||
if (camera_rotatetoto.value) {
|
||||
timer.stopTimer();
|
||||
camera.value?.quaternion.slerp(camera_rotatetoto.value, 0.5);
|
||||
camera.value?.quaternion.normalize()
|
||||
|
|
Loading…
Reference in New Issue