#HEYAA!!! CAN ANYONE ANSWER MY FRIEND'S QUESTION PLEASE THANKS:
1 messages · Page 1 of 1 (latest)
What do u mean?
i want to know what is not working as you want
They're just unsure how to use Lerp to make acceleration and deacceleration in the code presented above, they don't have a problem, they need help
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)
May i ask what weight might be
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
the weight is some kind of coefficient the lerp function gonna use to make the progression
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.