Hi, I’m attempting to use LeanTween and I was wondering what the best way to make a group of objects follow behind a jumping target would be? Think Yoshi’s Island on the Super Nintendo where the eggs/objects follow Yoshi in their jump path until each egg reaches a spot close enough to stop.
DOTween (HOTween v2), a Unity tween engine page-62#post-4492342
That post from a couple years ago in another thread mentions following a moving target, but the sample code I tried from the documentation doesn’t work quite like I’d hoped. I was hoping for more of an accurate arc/parabola.
LTDescr d = LeanTween.followLinear(this.transform, playerController.midPointOfPlayer, LeanProp.position, fMoveSpeedForDoubleJumpFollow);
//d.setTime(fDur);
//d.setOnComplete(aResetFromMAXDJ);
Invoke("ResetCatFromMaxDJ", fDur);
I already store the position of the target/player along their jump arc in the player’s class, but I’m intending to start the following gameObjects on their own arcs before the player is guaranteed to land because it would look weird if they had to wait for the player that much. I saw the “move along a path” function included in the plugin, which looks like it might work, but I think I’d need to update the following object’s tween path as new positions for the player’s jump arc get stored.
Is that the right idea and even possible or is something else a better approach?