smooth transition between points using hermite interpolation for position and sphere interpolation for rotation

This commit is contained in:
2025-01-28 02:27:23 +01:00
parent c909cbd6da
commit 0f159baf9d
4 changed files with 112 additions and 21 deletions

View File

@ -6,7 +6,7 @@
/* By: ycontre <ycontre@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/15 14:00:38 by TheRed #+# #+# */
/* Updated: 2025/01/23 18:34:29 by tomoron ### ########.fr */
/* Updated: 2025/01/28 02:15:41 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
@ -59,6 +59,10 @@ void Camera::processMouse(float xoffset, float yoffset, bool constraint_pitch =
_yaw += xoffset * _sensitivity;
_pitch += yoffset * _sensitivity;
// while(_yaw < 0)
// _yaw += 360;
// while(_yaw > 360)
// _yaw -= 360;
if (constraint_pitch)
{
if (_pitch > 89.0f) _pitch = 89.0f;