Start of a page turning system. This one is very much wip in progress, it works but there is room for improvement. This is based on an action script page turn effect and has some limitations so I will be adding a new page flip effect soon which will offer a much nicer turn effect and wont have the side effect of flattening the mesh. To make best use of this script you should a MegaShape page mesh as your base.
Page Flip Param Description
Turn
Amount the page is turned from right to left 0 – 100.
Ap1
Amount of curl early on in the turn.
Ap2
Amount of curl mid way through turn.
Ap3
Amount of curl at end of the turn.
Flip X
Use this if page turns from wrong edge.
Advanced
If you click Advanced a load of extra params open, you can use these to control the whole effect but each param is basically a coefficient in the maths that control the page turn so it is very much a case of trail an error but if you are feeling brave have a play. The new page turn modifier will be much nicer.
Page Flip Class
{
public bool animT;
public bool autoMode;
public bool lockRho;
public bool lockTheta;
public float timeStep;
public float rho;
public float theta;
public float deltaT;
public float kT;
public float turn;
public float ap1;
public float ap2;
public float ap3;
public bool flipx;
Build a Book Script
There is a script include in the extras section that make is easy to build a complete book by allowing you to say how many pages are in the book and a texture for each page, the books can then be controlled with a single value that will open the book and turn each page until it closes the book.
Video showing the Build Book process
You must be logged in to post a comment.
3 Comments
27 June 12 at 8:31am
1
Hello,my name is silent,I am chinese,english is not good,l don't know how to use this scripts,so can you give me a demo,my Email is fanxu1218@hotmail.com,thank you very much.
27 June 12 at 10:15am
2
Hi There, the best way to learn how to use the PageFlip would be to look at the MegaBook.cs source code and view the video above (fixed the broken link)
27 June 12 at 10:31am
3
I am in china ,I can't watch the youtube.