- Home /
Lerp a Child but 'keep up locally' with Parent
My character is the child of a moving parent and its movement relative to it right now is pretty much where I wanted it to be. Except sometimes I move the player manually with lerp.
At first it was to a point decided before the lerp and obviously it would go there in world space coordinates and the parent would move away, so I made that point an empty object and made it the child of the moving parent so the player is moved to that exact spot locally.
It works fine until the parent gets up some decent speed, not too much but a bit. The player makes the total trip in the right amount of time but it kind of 'chases' the parent rather than making the straight line it should make if it were standing still. I guess this is because lerp deals with worldspace coordinates and while lerping it stops that 'relativeness' of being a child of the moving parent.
So how can I keep up with the parent during these circumstances? Should I use a different system to move the character rather than lerp for this?
The parent manually transform controlled by the way, no physics if thats relevant.
I've read you question a couple of times and don't understand the question. A video of the bad behavior would be helpful.