I am working on 3D Carousel for android.
I am using this code and the following is my current output.
I want to develop the following 3D shaped carousel.
I refered to the following questions which are already asked in SO.
How to do 3d Carousel with modifications in image's dimensions and angle
How to create list with carousel effect in android
how to increase carousel image space?
Coverflow Carousel effect same as iPhone/iPad in android
The following is near to my requirement:
From this I answer I put:
mCamera.rotateY(-((CarouselItem) child).getCurrentAngle());
inside getChildStaticTransformation()
method of Carousel.java
but I'm not getting a perfect result.
Please help me to solve it.
You are using a function called Calculate3DPosition which calculates X, Y, Z positions from the angle and then those are used in a matrix.translate call.
What you need is actually much simpler - you just need to call matrix.rotate with the angle. It might look surprisingly easy when you've finished, but honestly, the only complexity in the 3D code you have copied is from attempting to keep everything facing the user instead of letting it rotate ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With