From 38e389606ad66d6a15ae6650eccbb0acd5d4a4e9 Mon Sep 17 00:00:00 2001 From: omar salah <114373468+omarsalaheldieen@users.noreply.github.com> Date: Fri, 14 Jun 2024 01:45:20 +0300 Subject: [PATCH] feat: Update smooth_script --- smooth_script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smooth_script.js b/smooth_script.js index 710a4a8..e66319d 100644 --- a/smooth_script.js +++ b/smooth_script.js @@ -12,10 +12,10 @@ AFRAME.registerComponent("lerpsmooth", { // if we know about the previous position if(this.prevPosition) { // smooth position - this.target.object3D.position.lerp(this.prevPosition, 0.05) + this.target.object3D.position.lerp(this.prevPosition, 0.1) // smooth rotation - let rot = this.target.object3D.rotation.toVector3().lerp(this.prevRotation, 0.05) + let rot = this.target.object3D.rotation.toVector3().lerp(this.prevRotation, 0.1) this.target.object3D.rotation.setFromVector3(rot) } // we don't know about the previous position