Language

Pinball Flipper using Quaternion.Lerp?

Greetings. I am attempting to make a pinball flipper. I use a cylinder shape as a hinge with a cuboid as it's child. I would like to know how to rotate the hinge FROM 40° TO -40° on the y-axis in 0.5 seconds, and back to its original position (40°) when the key is no longer pressed. Using C#, I understand Quaternion.Lerp is involved, however the tutorial requires rotating from one object to another, which is inconvenient. I'd appreciate the help :)