- fix camera move when has goal
This commit is contained in:
Kum1ta
2024-11-20 14:09:47 +01:00
parent 1eb5bb6cdb
commit 4e3d8578c9

View File

@ -6,7 +6,7 @@
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */ /* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/18 00:30:31 by edbernar #+# #+# */ /* Created: 2024/08/18 00:30:31 by edbernar #+# #+# */
/* Updated: 2024/11/19 17:40:08 by edbernar ### ########.fr */ /* Updated: 2024/11/20 14:08:04 by edbernar ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -306,6 +306,7 @@ class Player
{ {
clearInterval(this.interval); clearInterval(this.interval);
this.object.position.y = this.limits.up; this.object.position.y = this.limits.up;
if (!isOnPointAnim)
this.camera.position.y = 2.34; this.camera.position.y = 2.34;
this.interval = null; this.interval = null;
} }
@ -325,6 +326,7 @@ class Player
clearInterval(this.interval); clearInterval(this.interval);
this.interval = null; this.interval = null;
this.object.position.y = this.limits.down; this.object.position.y = this.limits.down;
if (!isOnPointAnim)
this.camera.position.y = 1; this.camera.position.y = 1;
} }
}, 5); }, 5);