Hello I want to rotate a disk with each button click, the problem is when I just use AddLocalRotation it instantly snaps to the new location. So I tried using a timeline but with a timeline it starts to infinitly spin. I tryed my timeline with the SetRelativeRotation instead of add and then it works, it smoothly changed the rotation. But set is only once and I want to change the rotation with each click a little bit more.
#How do I rotate an object smoothly? And add to the rotation with each click
1 messages · Page 1 of 1 (latest)
Wire to Play from Start, not Play
But also, since it's "adding" local rotation, not "setting" local rotation, you don't need to lerp
You can just add a fixed amount each call (or delta time)
okay thanks i will try it out!
sadly it does not work
when i do it like this, or also with the lerp it still spins infinite
I want it to add a rotation everytime i click, everytime i click add +35 rotation but like this it does it all at once and it starts to spin super fast
well you're adding 35 degrees every single tick
not in total
The Update output of a timeline is called every frame when the timeline progresses
Also forgive me I've not long woken up, the Lerp actually looked fine
I thought you wired up the wrong value. I need more coffee 
but
You shouldn't use Lerp with Add, it should be used with Set
So actual steps:
- Get the current rotation of the object, before starting the timeline. Store this value in a variable
- Timeline, keep the Lerp
- For A value of Lerp, have it be the stored rotation value. The starting rotation
- For B value, it should be start + desired delta (in your case 35)
- Use Set, not Add, rotation
yeah i dont really get behind timeline, i will watch a video about it
I will try solving it using your steps now
So a timeline is just a way to transform values over time. I assume, in your case, you are increasing a single float from 0 to 1 since you have a float output
That's pretty much all they do. How you use that value is up to you
Like this
i did it like this now and it works! big thanks
oh you could also lerp rotator yeah sure that works!
oh i forgot about the add operrator, but i think combine rotators works the same
Actually, it arguably works better because you're storing the complete rotation
Whereas in my example, it's setting x and y to 0
you might want to keep x and y to their current values
So go with your solution 
Yeah, Combine Rotator with Lerp Rotator works much better
yeah but i dont know how xd
the way i did it works good but it also changes the other axis a little bit
i think its because combine rotators but i am not sure
ok nvm its fine, my asset is just weird because its made out of combined parts