dotween icon indicating copy to clipboard operation
dotween copied to clipboard

Allow Shake/Punch generic methods to work with floats

Open Demigiant opened this issue 10 years ago • 4 comments

Original from jedhubic on Google Code (Issue 33):

Hey there, been loving DOTween and was an instant donator after my first use. I was wondering if it's possible to add tweening on the generic methods to apply to floats as well? Right now the getters/setters require Vector3s, which, are easy enough to work with on variables I've created, however some scripts and stuff that I'm using would benefit greatly if I were able to apply tweening like punch or shake on a float value (camera distortion is one example). Hope that makes sense??? Thanks!

Demigiant avatar Mar 18 '15 18:03 Demigiant

This is also the function I want... But it raises in 2015╮(ツ)╭ Maybe I should just shake a Vector3 then get the .x

AemaethMonster avatar Jul 07 '18 03:07 AemaethMonster

I completely forgot about this :P I think I remember trying a single-float shake, but I wasn't satisfied (though my memory is horrible). But yup, for now I'd recommend shaking a Vector and getting its X value :P

Demigiant avatar Jul 07 '18 06:07 Demigiant

I would like this as well. I imagine that punching a float would look look like a sort of diminishing sine wave. It would be great for cases where you are animating a rotation: you could create a sort of harmonic vibration effect.

maartenwiedenhof avatar Nov 18 '21 16:11 maartenwiedenhof

I know necro, but I'm always wanting to punch floats, it's just a very useful way to animate a value as it gives you a yoyo effect without applying loops and curves.

MrDizzle avatar May 08 '24 10:05 MrDizzle