bevy
bevy copied to clipboard
"smooth_damp" functions for primitives and math structs
What problem does this solve or what need does it fill?
I need to smoothly move a value towards a target value over time using velocity and other parameters (see below).
What solution would you like?
I would like a set of "smooth_damp" functions for primitives and which have:
- current
- target
- velocity
- smooth time
- max value delta
- time delta
Importantly, I would also like a spherical smooth_damp for Vec2 and Vec3.
What alternative(s) have you considered?
A similar effect can be achieved using interpolation functions while updating the start value. However, this lacks all the parameters of a smooth_damp function.
Additional context
https://docs.unity3d.com/ScriptReference/Vector3.SmoothDamp.html