I’ve been told that quads are a good way to create a 3D book. The game I am creating is first-person, and I would like the player to be able to open a book whenever they like. They could flip pages, and look through the information given. In the future I will worry about adding words to the pages, and some other things.
I was inspired by this gameplay, about 53 seconds into the video: - YouTube
The only problem is I don’t know what they are, and how to use them. To put it simply, how would I create the covers and pages? I would be grateful if someone could talk me through it! Thanks.
Creating a whole book is beyond the scope of a UA question. There are multiple technical question, and multiple possible implementations, and you’ve not really specified how the book behaves…how it is brought out, how the user interacts with the pages, etc. Unity Forums is a better place for open design question. Since I gave you the comment about Quads in your previous question, I’ll outline how you can build a page with Quads. This is not the only solution, and depending on your platform and number of pages, it might not be the best solution.
Import two textures into Unity to represent the front and back of a page
Create a new scene
Create a material new material (call it Page0). For this test, use Unlit/Texture for the shader. Add one of the page textures to the material.
Duplicate the material, replace the texture with texture for the second page.
Create a Quad (Game Object>Create Other>Quad)
Set it position to the origin (0,0,0).
Change it’s ‘Y’ scale to 1.4
Name the Quad ‘Page0’.
Duplicate this Quad
Rename it ‘Page1’
Set the ‘Y’ rotation of ‘Page1’ to 180
Drag and drop the ‘Page0’ material onto the ‘Page0’ quad. Do the same for ‘Page1’.
Create an empty game object.
Place the empty game object on the left edge of the quads half way down. The position should be (-.5, 0, 0). Name the empty game object ‘Page’.
Make the two quads children of the empty ‘Page’ game object by dragging and dropping them on the ‘page’ game object in the hierarchy.
Now you have a page. If you rotate the empty game object on it ‘Y’ in the inspector, you will see this page flip. Multiple pages make a book. You will want to Create a empty game object ‘Book’, and make each page a child of the book. To get the look in the video, you will need to bring the book closer to the camera and rotate it on the ‘x’ axis. This movement and rotation should be done at the ‘Book’ level not the ‘Page’ level.
Personally I’d create one page prefab and build the book in code, but you can build all the pages by hand. As noted in the previous question, there are some potential performance issues with as I’ve described here depending on number of pages and the target platform.
As for the code, there are multiple ways to do the design. If this is something you are struggling with, I suggest you ask on Unity Forms. If you are struggling with a specific question like, “How do I flip one page,” then post that specific question on UA.
You were told wrong. Imagine you asked some chemists how to get a chocolate bar. They might say to start with 90% glycerol. “Build it with quads” is the same sort of joke answer. It’s a reference to directly building a Mesh with a Unity program, instead of making it the easy way.
The book in the video is just some planes put together. Look up how to make double-sided planes in UA. Can use the parent-child trick make the planes spin on the ends (normally they would spin in the center.) As you practice Unity, this stuff will get easier. Maybe do non-book stuff for a while.
But, the book is just cutesy. If you want to present actual stuff for them to read, it has to be easy to read. Getting crisp text is hard enough already. Putting it at an angle, with perspective scrunching is going to strain eyes, and get old real fast. Better to just flash a book, make the page sounds, but have the text be standard GUI stuff (or a page-y background?)