• 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 Astroleon · Nov 04, 2012 at 09:37 AM · rigidbody3dwallcubes

Will Goldstone turtorial; wall of cubes not normal, just exploding.

So I am following the Goldstone Unity 3D beginners guide (Game Development Essentials). Following the basic instructions, it has had me create a cube on a floor, apply RigidBody to said cube and a color material, and snap duplicate the cube to make a wall.

Yet, when I launch the game (I have my camera in front of the wall so I can see), it just explodes and scatters the cubes everywhere. Since later in the tutorial I'm supposed to shoot it down, I think it's supposed to be stood still when I launch the game (as a wall would), yet without any prior scripting it just explodes. What am I doing wrong?

Comment
Add comment · Show 6
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 fafase · Nov 04, 2012 at 09:38 AM 0
Share

Would there be an animation that is set to PlayOnAwake ?

avatar image Astroleon · Nov 04, 2012 at 09:45 AM 0
Share

I'm not sure; could you tell me where I could check this?

avatar image fafase · Nov 04, 2012 at 09:50 AM 0
Share

Actually it is playAutomatically.

You could add a script to your cube object or if there is one already try with:

C#:

 void Start(){
     animation.playAutomatically = false;
 }

or UnityScript

 function Start(){
    animation.playAutomatically = false;
 }

If that does not fix it at least that eli$$anonymous$$ates that case

avatar image Astroleon · Nov 04, 2012 at 10:02 AM 0
Share

Nope I just get console errors;

$$anonymous$$issingComponentException: There is no 'Animation' attached to the "Cube" game object, but a script is trying to access it. You probably need to add a Animation to the game object "Cube". Or your script needs to check if the component is attached before using it. stop.Start () (at Assets/It will work this time/stop.cs:7)

avatar image Astroleon · Nov 04, 2012 at 10:06 AM 0
Share

Literally all I have done is created one cube on a floor, put a color on it, made it a Rigidbody, duplicated it to make a row of 8, created an empty gameobject, put the 8 cubes inside of that in the hierarchy panel, and then snap duplicated those cubes (all at the same time) to make a "wall". It is all stacked properly in the scene view but when I press play it doesn't stand still; nor does it "crumble", it just explodes and most of cubes fall off the edge of the platform, with some landing on the floor.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by willgoldstone · Nov 04, 2012 at 04:20 PM

This is nothing to do with Animation, there is no animation involved with this point in the book. If you have snapped these all correctly, there shouldn't be any more than a slight jitter only noticeable when zoomed in - nothing should fly apart. If Colliders intersect during edit time, then you press Play, then you'll see them being forced apart by the Physics engine.

I think you've probably just duplicated one of the blocks twice by mistake, and left one in the same place as another which would cause this problem, double check them all position wise.

Comment
Add comment · Show 1 · 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 Astroleon · Nov 07, 2012 at 01:38 PM 0
Share

Thank you very much! Progressed a bit further into the book since then (onto the placing the cabin on the island bit), but will go back and try this.

Thank you for writing an amazing and easy to understand book, would recommend. :) (and for especially taking the time to answer this question.)

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

12 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

Related Questions

How do i Clamp the Z position of a rigidbody? 1 Answer

A node in a childnode? 1 Answer

2D rigidbody movement & walls 2 Answers

How can the player position updates randomly when the player isn't movingl? 0 Answers

Physics not working properly 1 Answer


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