Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Oct 15, 2013 at 09:14 PM by robertbu for the following reason:

Design discussion/Multiple technical questions.

avatar image
0
Question by $$anonymous$$ · Oct 15, 2013 at 05:15 PM · flipanimatebookpages

How could I write a script to flip pages of a book?

Using the help of the community on Unity Answers, I have created a 3D book. The game I am creating is in first-person, and the player is able to bring out their book with 'e'. Each page is made up of 2 quads, and are able to rotate on their own local axis. The book itself is complete, but I'm unsure of how to write the script that will animate the pages. It would be great if you could help me out! Thanks.

Also, I have already made a script that flips the pages fairly well, but I did it in a very ineffieciently. It was a very long, point-less script. I'm sure there are better ways to write the script. I prefer JavaScript, and excuse my vague question. I have been told that I don't usually include much information.

This is a continuation of my previous 2 questions:

http://answers.unity3d.com/questions/554933/how-could-i-create-a-book.html http://answers.unity3d.com/questions/555564/how-could-i-use-quads-to-make-a-book.html

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image meat5000 ♦ · Oct 15, 2013 at 05:16 PM 0
Share

Thanks for linking your previous questions. If this is the same question but more developed you should probably Close the old ones.

avatar image robertbu · Oct 15, 2013 at 09:13 PM 0
Share

Flipping pages in a book is not a simple technical question. It embodies multiple technical problems and is highly depending on your design and goals. Here is a list of questions to consider:

  • How many pages?

  • What is the resolution of each texture?

  • What is the target platform: PC, Web, $$anonymous$$obile?

  • What are the operations that can be done on the book and what is the interface for each: Next page, previous page, close the book, go to specific page, last page, bring the book up, put the book away...?

  • How important is riffling (i.e. display of multiple pages when going to a page in the book)?

All these questions have a impact on the design. But Unity Answers is not designed for nor is the place to ask overarching design questions. As mentioned by me in your other question, Unity Forums with their discussion format is a much better fit. When you get down to specific questions, then UA is a great fit.

1 Reply

  • Sort: 
avatar image
1

Answer by YoungDeveloper · Oct 15, 2013 at 05:35 PM

I would create a nice model of a book, and only one page (modeled from both sides). Then I would animate the page (one motion flip animation), uv unwrap both page sides as a seperate objects,both book sides as two separate objects and base book on third uv map. Now I'd write an array or textures, and add extra variables, like min, max and current page. So all i have to do now is create pages textures. And insert in the public array in the order they will be in the book.

When user flips the page, dynamically change textures from textures array to next array element. In reality,you will be flipping (playing animation) the same and only page model, but because of texture change it will look like you are flipping pages.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image $$anonymous$$ · Oct 15, 2013 at 07:55 PM 0
Share

Thanks! For the first time in a while, I really understand what someone means. I completely understand the concept, but I'm not exactly sure how to do this.

avatar image YoungDeveloper · Oct 15, 2013 at 08:01 PM 0
Share

It's called learning :) I think I explained everything pretty clearly. Start by modelling, unwrapping, texturing, animating then scripting.

Follow this Question

Answers Answers and Comments

15 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How could I create a book? 6 Answers

how to add material component to an Animate GUI script 1 Answer

How do I Rotate a Skybox's Material 4 Answers

Editing buttons created in 'for' loop. 0 Answers

Am i using good the array ? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges