Extend TweenRotation with Quaternion parameter
ModischFabrications opened this issue · comments
Is your feature request related to a problem? Please describe.
I want to TweenLocalRotation
to an old rotation, but the Quaternion
rotation doesn't fit the Vector3
parameter.
Describe the solution you'd like
TweenLocalRotation(Quaternion to, ...)
Describe alternatives you've considered
Manually arrange and convert all values?
Hi Modisch. Thanks for opening this issue, if you'd like to I can add support for native rotation. Note that if you'd like a rotate to an old rotation you can capture a rotation as euler angles in a Vector3 format using myGameObject.transform.eulerAngles
.
Thank you for the quick and kind reply, I am using .eulerAngles as you described at the moment.
The enhancement is by far not a necessity, it's just something that was unexpected for me while testing for the first time. Feel free to close this issue if it's deemed useless. If I understand the code correctly it's actually using Quaternions internally, so exposing it as an alternative interface should be an easy addition for a more flexible interface.
Hi! Thanks for your response. I've been thinking about it, TweenRotation has always been a weird duck, since I tend to keep the method name the same as the component name and variable it will be Tweening. IE TweenSpriteRendererColor. If I'd add support for Quanterions, I'll think I will refactor the Vector3 methods to TweenEulerAngles and TweenLocalEulerAngles. What are your thoughts on this?
If you mean that TweenRotation is gonna take Quaternions and there are new Tween(local)EulerAngles then yes, that's exactly what I envisioned 👍🏻