The cooldown/reload animation should run with a constant angular speed like a clock, instead it slows down on the edges. Just a minor detail that bugs me...
Description
Details
- Commits
- Restricted Diffusion Commit
Restricted Diffusion Commit - Task Type
- Bug
- Affected Gamemode(s)
- none/unspecified
- Reproducible
- Yes
- Last tested (version)
- 0.19431
- Category
- Animation
- First occurrence (version)
- 0.19361
- OS-Specific
- No
- Hardware-Specific
- No
- Video Card Vendor
- uncertain
Event Timeline
it looks like it pauses in the edges, very visible with a long reload weapon system (missile+100%beam for instance)
Validated seen it myself via missiles atc it isn't very smooth at all and slows down when it nears edges.
Confirmed: the endpoint of the line always moves by a fixed amount of pixels alongside the side of the square, stopping in the edges for 2 iterations to change sides.
Tested using the cooldown of a 1-block scanner.
-QA Testing-
Behaviour unchanged. tested build: 20150907_154125
I assume after 4 days and 7 builds the commit has been merged?
It appears that I missed the jump drive and scanner charge animations. Is that what you were re-testing with?
Yes. As 1-block-scanners reload very slowly, I test with those first, as the difference is much easier to spot.
-QA Testing-
The animation does not stop in the edges, however, it still slows down towards them. You can see it if you cover your monitor except for a circle around the center of the slot. Affects weapon and scanner cooldown, other cooldown/charge animations were not tested yet due to the aforementioned results.
There's really nothing else I can do. Either I make the 'line' move around in a circle at a constant speed but clipping at the edges of the square (which caused the first issue), or I make the second point in the line follow the edges of the square, moving at a constant speed (which is the new implementation). There's really not any other way to animate the cooldown :S
There should be:
If t=timeSinceAnimationStart and T=lengthOfAnimation, and v(t)=speedAlongsideSquare, then a constant angular speed of the line can be achieved by:
v(t)=1-cos(PI*4t/T)*(sqrt(2)-1)
[assumed average speed: 1]
Since speed is the derivative of distance over time[after some dividing to get the numbers within the frame of 0 and 1]:
s(t)=t/T-(sqrt(2)-1)*sin(4PI*t/T)/4PI
v0, 4PI and (sqrt(2)-1) are all constants, so those shouldn't keep the computer too busy.
s(t) will tell you how much of the circumference of the square the line has traveled since the animation started, and for as long as 0<t<T, 0<s(t)<1
I hope this helps[and I hope I didn't make a mistake in the math].