#HEYAA!!! CAN ANYONE ANSWER MY FRIEND'S QUESTION PLEASE THANKS:

1 messages · Page 1 of 1 (latest)

stiff temple
#

hey, tell me, what is the REAL problem you encounter ? accelerating and deccelerating ?

stiff temple
#

i want to know what is not working as you want

feral pebble
stiff temple
#

Right now the code should work as intended and make the character accelerate and decelerate as intended.

But if you want to use lerp you can change 'move_toward' to 'lerp', and just put a speed_multiplier instead of the operation

#

lerp(current_value, Target value, weight)

feral pebble
#

I'm trying to code it right now by myself

#

Since the friend is busy

#

I'm getting an error as follows

#

"Invalid type in utility function lerp() cannot convrrt argument 2 from integralto float

stiff temple
#

the weight is some kind of coefficient the lerp function gonna use to make the progression

subtle bobcat
#

Weight in lerp is what percentage of way between start and end it will be.
0.0 gives the start number. 1.0 gives the end number.
0.5 gives 50% of the way between the two values.