Having trouble wrapping my head around that one in visual code!
What do you mean by lerp? Do you want to tween between two values over a certain amount of time?
Exactly. Something simple like
while(timePassed < lerpTime)
someVariable = Mathf.Lerp(startingValue, finalValue, timePassed / lerpTime);
timePassed += Time.DeltaTime;
In v.1.4, every property and variable will be tweenable with a simple node. Until then, you can do exactly this with graph variables and the update node in a macro!
I don't have time to make a full example right now, but it could look like:
Here's how I would setup the input/outputs:
Heyyyy, that'll be super useful. Thanks for the suggestion too!
Already uploaded FloatTo with a wrapper if you used DOTween which is free and excellent. Nothing custom using my own math. I also have ColorTo and Vector3To which I haven't uploaded.
And if you are looking for speed based, it's quick to change that. There is just one node to add, SetSpeedBased. Clamp the current value if you want an integer. Something else more specific you need?
Nice, Ill check it out!
we can´t do this with your nodes? i´m trying with lerp node but nothing happens.
I made a little Lerp/Slerp Macro, because i don't want to import a 3rd party tweening asset everytime, when i just want to do a little test/prototype.
Customer support service by UserEcho