Explicit Additive Animation - transform.rotation.y

Originator:SoCalledNonFlipped
Number:rdar://12088301 Date Originated:13-Aug-2012 03:46 PM
Status:Behaves correctly Resolved:
Product:Mac OS X Product Version:10.8
Classification:Enhancement Reproducible:Always
 
13-Aug-2012 03:46 PM Kevin Doughty:
Summary:
Rotations in the y-axis, when running concurrent additive animations, have discrete jumps when they are not present in the x and z axes.

Steps to Reproduce:
Build and launch AdditiveRotationY. Note that this is the same workspace from a previous bug report with the additional project added.

Expected Results:
The absence of discrete jumps.

Actual Results:
Discrete jumps.

Regression:
X and Z axes work fine.

Notes:
Wouldn't it be nice if iOS transitionFromView:toView:duration:options:completion: was not only non-blocking, but also produced beautiful, seamless animations? 

13-Aug-2012 03:46 PM Kevin Doughty:
'AdditiveAnimationTests.zip' was successfully uploaded

13-Aug-2012 03:57 PM Kevin Doughty:
Please modify the BOOL verbose to equal YES in the function flipKeyPath: to see that y reports -0.0 and -0.0 when x and z report 0.0 and 3.141593. Also, please disregard the unused function updateGauge:

12-Oct-2012 05:58 PM Apple Developer Bug Reporting Team :
Engineering has determined that this issue behaves as intended based on the following information: 

This is an expected issue with the euler angle rotations. The recommended solution is to use CAValueFunction to create single-axis rotation animations, i.e.:

anim = [CABasicAnimation animationWithKeyPath:@"transform"];
anim.fromValue = [NSNumber numberWithFloat:0];
anim.toValue = [NSNumber numberWithFloat:M_PI];
anim.valueFunction = [CAValueFunction functionWithName:kCAValueFunctionRotateY];
anim.additive = YES;  // if necessary
etc…

03-Jan-2013 06:49 PM Kevin Doughty:
If this is the result of using Euler angles, then why does the error not happen when not using additive animation? You can add, starting at different times but eventually all running simultaneously, an x, then a y, then a z-axis animation without discrepancy. It is only when you try to run two simultaneous y-axis animations that this occurs. I imagine there is plenty of voodoo in accomplishing what CA does with transforms, but if you guys understood the importance of additive animation you would try to eek out just a little more voodoo.

03-Jan-2013 06:52 PM Kevin Doughty:
P.S. CAValueFunction does not work with additive animation at all.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!