- Home /
Question by
zadeh79 · Dec 25, 2019 at 01:49 AM ·
lerpscene-loadingscene loadreloading
LERP function only works on initial scene load
The LERP function works fine on my initial loading of the scene, but every time after, I reload the scene, the LERP function will not work. (My sprite texture just stays in it's initial spot). Please help...
void Update()
{
if (fracmov > .95f)
{
fracmov = 0f;
}
fracmov = fracmov + .1f * Time.deltaTime;
rbwitch.transform.position = Vector3.Lerp(new Vector3(-15.40f, -2.8f, 0), new Vector3(15.20f, 35.5f, 0), fracmov);
}
Comment
Never$$anonymous$$d, i figured this out. I had another sprite attached to the same script and that was causing the weird issue.
Answer by asianfanfics68 · Dec 25, 2019 at 04:12 AM
I like your post, I hope you have many good posts like this to share to the reader. vex 3