#When should i use lerp()

1 messages · Page 1 of 1 (latest)

red yarrow
#

i understood the difference between tweenservice and lerp.
a guy said that lerp is better with physics and real time calculations and it uses less network usage.
so can someone give me an example (like a small system) where it is better to use lerp()

kind plume
red yarrow
kind plume
red yarrow
#

if its on the server yes

#

i think lerp is better

lone jasper
#

lerp gives you more control over the interpolation of an object/value.

Usually you will use lerp() on physical objects because it can change while the object is in motion. (In a heartbeat for example)

Tween service runs on 1 animation and when you call :Play or wtv it’ll follow that A -> B trajectory no matter what.

boreal fox
restive zenith
#

You can use tweenservice:getvalue

#

Research it

#

It’s like lerp but with easing styles

boreal fox
restive zenith
boreal fox
restive zenith
#

Big misconception

#

When you create a tween yes it is one animation

#

But when you incorporate getvalue then you can have it almost exactly like lerp but with easing styles

#

Lerp is linear interpolation

#

Getvalue lets you interpolate based off of easing

#

I don’t understand why it’s so hard to just simply google getvalue

#

💔 💔

#

Are you still gonna persist with your misinformation or will you take five minutes of your time to research what I told you to

hearty arch
lone jasper
#

i know you can pause and resume like a lerp technically

#

but its like

#

why

#

just lerp

#

i see you can use getvalue but i feel like (maybe im wrong ive never used it) it’d end up making the interpolation look a little bit more choppy if you’re not careful

#

you can make both of them work but like why with the extra overhead

restive zenith
#

I never use getvalue

#

But it’s just clearing up what he was thinking