void Update() { var pos = cube1.position; pos.x = LeanSmooth.damp(cube1.position.x, followTrans.position.x, ref cube1VelocityX, 1.1f); cube1.position = pos; pos = cube2.position; pos.x = LeanSmooth.spring(cube2.position.x, followTrans.position.x, ref cube2VelocityX, 1.1f); cube2.position = pos; pos = cube3.position; pos.x = LeanSmooth.bounceOut(cube3.position.x, followTrans.position.x, ref cube3VelocityX, 1.1f); cube3.position = pos; //pos = cube4.position; //pos.x = LeanTween.smoothQuint(cube4.position.x, followTrans.position.x, ref cube4VelocityX, 1.1f); //cube4.position = pos; pos = cube5.position; pos.x = LeanSmooth.linear(cube5.position.x, followTrans.position.x, 10f); cube5.position = pos; // cube6.position = LeanTween.smoothGravity(cube6.position, followTrans.position, ref cube6Velocity, 1.1f); if (LeanTween.isTweening(0)) { Debug.Log("Tweening"); } }
private void Update() { // Use the smooth methods to follow variables in which ever manner you wish! fromY = LeanSmooth.spring(fromY, followArrow.localPosition.y, ref velocityY, 1.1f); fromVec3 = LeanSmooth.spring(fromVec3, dude5Title.localPosition, ref velocityVec3, 1.1f); fromColor = LeanSmooth.spring(fromColor, dude1.GetComponent <Renderer>().material.color, ref velocityColor, 1.1f); //Debug.Log("Smoothed y:" + fromY + " vec3:" + fromVec3 + " color:" + fromColor); }