#its when it starts going back from the

1 messages · Page 1 of 1 (latest)

glad perch
#

i would log duration and Time.deltaTime to see i what is going on

fresh nebula
#

Does lerp get faster as it gets closer to B?

#

perhaps this is what im facing

glad perch
#

why are you doing

       while (duration < MAX_DURATION / 2)

?

fresh nebula
#

just to make the effect go out faster than the in time

glad perch
#

then you should double the value added to duration not half the way to go

fresh nebula
#

ooo

glad perch
#

Mathf.Lerp(0.6f, 0, duration) expects duration to be between 0 and 1
if you only go from 0 to 0.5 it will only do half the way and then jump

#

if you the the values after the loop

fresh nebula
#

duration += Time.deltaTime / (MAX_DURATION / 2); i needed this. you're right

#

its still popping, i just dont understand

#

its as soon as the coroutine starts. And right after the first while loop

glad perch
#

mmmm i dont see how that can come from that code...

#

given i dont test with the post prcessing just with debug logs and draw rays

#

found it

#

@fresh nebula

#

its the MAX_DURATION

#

the jump is gone if you set it to 1

#

simular to the
MAX_DURATION / 2
you did limit the maximum value to reach

#

that is the issue

fresh nebula
#

omfg

glad perch
#

if you want it to go faster you have to use the multyply on the Time.deltaTime that gets added to duration

fresh nebula
#

you jst

#

it should be 1 in the while loop

#

god im a fucking moron

#

Thank you for the rubber duck haha

glad perch
#

^^ no problem

#

i only could see the issue when i added the visuals to the test case