I've came across this code which works very well when applied to a view:
view.setPivotX(view.getWidth());
view.setPivotY(view.getHeight() * 0.5f);
view.setRotationY(90f * progress);
I've tried many configuration to make it work just with Matrix and camera, but this is not my strong suit... is it even possible?
Is the behavior so fundamentally different between the View's rotation and the Matrix rotation?
What I'm trying to accomplish is Animation Transformation between views, but I want to achieve this generically without the view!
Specifically a Cube rotation like this.
All other examples I've seen does not result in the same effect!!
The difference is I want to make it work in an Animation object, Like so:
public class CubeRotate
extends Animation {
public CubeRotate() {
}
@Override
public void initialize(int width, int height, int parentWidth, int parentHeight) {
super.initialize(width, height, parentWidth, parentHeight);
}
@Override
protected void applyTransformation(float interpolatedTime, Transformation t) {
final Matrix matrix = t.getMatrix();
...
What should be here to get the same result?
...
Log.d("Matrix", "\n" + matrix);
}
}