public void rotate(final float angleFactor) { GVRRotationByAxisAnimation rotationAnimation = new GVRRotationByAxisAnimation(place, 0.1f, angleFactor, 0, 1, 0); rotationAnimation.setOnFinish(new GVROnFinish() { @Override public void finished(GVRAnimation arg0) { Main.enableAnimationStar(); if(angleFactor > 0){ StarPreviewInfo.changeRotationFactor(StarPreviewInfo.Direction.left); } else { StarPreviewInfo.changeRotationFactor(StarPreviewInfo.Direction.right); } } }); rotationAnimation.start(getGVRContext().getAnimationEngine()); } }
public void rotate() { star.getTransform().setPosition(evPositionX, evPositionY, evPositionZ); star.getTransform().setRotation(evRotationW, evPositionX, evPositionY, evPositionZ); rotationAnimation = new GVRRotationByAxisAnimation(star, AnimationsTime.getRotationTime(), StarPreviewInfo.getRotation(), 0, 1, 0); rotationAnimation.setOnFinish(new GVROnFinish() { @Override public void finished(GVRAnimation arg0) { showCleanButton(); } }); rotationAnimation.start(getGVRContext().getAnimationEngine()); } }