- Home /
Question by
BenMcn4123 · Apr 14, 2020 at 10:36 PM ·
lerpsmoothfollow
How can I get a game object to follow something smoothly without using lerp.
I am making a game involving a cat that follows behind a player. The cat in question has movement set up for it but when I try to smooth it, it breaks down and its offset goes wrong. Could anyone help me with this? here is my code: c#
idealPosition = player.position + offset;
smoothedPosition = Vector3.Lerp(transform.position, idealPosition, CatSpeed);
transform.position = idealPosition;
Thank you in advance!
Comment