Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 /
avatar image
0
Question by Anakso · Sep 27, 2015 at 04:56 PM · c#cubecubemap

Unfold a cube into 6 squares with an animation.

Essentially what I want to do is take a regular cube game object and unfold it (With animation of it unfolding ideally) into a cube map/6 squares joined together like a cube. I've been unable to find any information on how to do this but I do know it's possible or should be possible.

I'd then add text to the unfolded squares and when the user is done they'd fold back up into a cube. (basically the cubes represent information and the user can click one to view more information and that's how the new information will be displayed)

Using C# for this.

Comment
Add comment · Show 1
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 Runalotski · Sep 28, 2015 at 01:07 AM 0
Share

It would be better to do it using blender (it is free) it is animation software it would probably be better as you can have control over pivot points which help create animations that you want

you can do this in unity but it looks a bit janky unless you spend a bit of time lining up game objects to use as pivots

to do it in unity make an empty game object called parentPanal then inside it make two empty game objects one called Back and the other called front inside these game objects add a cube with the dimensions of 1 x 1 x 0.1

at the top of the unity editor clip window => Animation to open the animation editor

now click on parentPanal in the animation window click under in the middle to move the red line ( scrubber )

if unity askes you to save it is trying to make an animation clip name it myAnimation1 or something and allow it to save

if you rotate the front panal you should see some diamonds come up is for animation you made

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by Arycama · Sep 28, 2015 at 06:24 AM

If you're referring to the cube created by going to GameObject > 3D Object > Cube, it would be rather complicated as you would have to reposition all the vertices of each triangle with code. (Or expose all the vertex positions in the inspector and control their position through an animation, while updating all of their positions every frame).

An easier solution would be to make your own "Cube" out of quads (GameObject > 3D Object > Quad), and parent each quad to an empty game object positioned to where you want each cube face to pivot, parent all of those game objects to a "Cube" parent, and simply make an animation within Unity where each face rotates around it's pivot until it is fully unfolded.

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 Anakso · Sep 28, 2015 at 03:36 PM 0
Share

Thank you, after much playing around I've managed to get this to work perfectly.

One other question though, how do I get the child objects (the quads) to use their parents position as the starting point? I'm moving the cube (parent object) around to place it the same way I did previously with unitys cubes, which works find except that the children for some reason are all +2 on the y axis to the parent. It's not a major problem right now since I can just put -2 on the position but would like to know how to fix this or understand why it's happening if possible.

avatar image AllFatherGray Anakso · Jan 04, 2021 at 09:27 PM 0
Share

@Anakso I am willing to purchase that code if you still have it.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

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

Related Questions

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

how to subdivide and smooth a cube in unity 1 Answer

Issue w/ Difference between Cube and Capsule 0 Answers

Create a circle using cubes? 3 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