Omg, youre amazing. And you call mine complex :) Omg Yeah it maybe easy for you but I had never heard about clamp and lerp. I envy you. I wish I had learnt them when I was at school.
Our teachers taught us sin,cos,tan as reading book. I always asked them, how can I use them in reality, how can I see results if I use them. They never told me that I can use in game/animation programming. Now even jumping with sin , or making a round object with, sin sounds too weird for me.
Whatever :) It works perfect. Thank you very much.
I searched a bit about "clamp" and "lerp".
Lerp only interpolates between 0.0 and 1.0
Clamp a value between a minimum float and maximum float value. If value is higher than max value, than result equals to max value, same for min value.
I quite understand them in theory but It's still difficult for me to understand it on runtime.
Thank you, thank you, thank you. I hope you can share more examples like this if you have spare time.