- Home /
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?
I'm not sure; could you tell me where I could check this?
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
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)
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.
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.
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
Follow this Question
Related Questions
How do i Clamp the Z position of a rigidbody? 1 Answer
A node in a childnode? 1 Answer
Inconsistency in Rigidbody.MovePosition 0 Answers
RigidBodies and "Slipping" Prevention 0 Answers
Strange Rigidbody Behavior 0 Answers