Rotation animations in Dragonflight
I'm having problems with a personal project that was working just fine in 9.1, involving animations, specifically rotation.
It seems to me that the :SetOrigin function works very differently than before or is broken in some way, here is a reproducer: Code:
local duration = 2.0; Any ideas what's going on here would be appreciated |
Check for the Blizzard API documentation.
https://www.townlong-yak.com/framexm...IDocumentation Specifically look into the SimpleAnimAPI. Maybe you can simplify your code using the new API and your problem vanishes on its own. |
How do I get a "SimpleAnimRotationAPI" or I guess "SimpleAnimationGroupAPI" object?
PS: the API looks identical to the normal animation API, what's the difference? |
1 Attachment(s)
Alright, still no idea how to use the Simple* APIs, I have in the meantime found a hint to the issue here, but this is the best I've managed to get:
Attachment 9773 (sorry, open original, forum compression is terrible) The red and blue dots should be on the LEFT and RIGHT points of the rectangle (capture starts somewhere in the middle of the animation) and the rectangle is supposed to rotate around the RIGHT point. Basically what I used is: Code:
offset_x_fixed = offset_x * width / UIParent:GetWidth(); |
Maybe (if the above is the effect you're looking for):
Lua Code:
|
Thanks for the attempt, but I need to rotate around an origin that is not on the edge of the texture (could just use "RIGHT" otherwise), I only used a point on the edge of the rectangle because that makes it easier to verify whether the rotation is correct.
I've in the meantime not been able to find an object with dimensions so that there is no wobble, but I'm fairly sure it has to somwhow correspond to the viewport or UIParent, maybe there are also just precision issues due to all the scaling going on. I've decided to switch to using a mask texture, which is an option in my case and hopefully won't even require the use of any animations, as using animations was a workaround in the first place. |
Despite having fixed the issue I was facing, I would still like to know if there was an actual solution, as the previous implementation was much more flexible, for example it allowed me to mirror the texture, now I have to have an actually mirrored texture file
|
All times are GMT -6. The time now is 12:35 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI