Today's Goal: Create a wall so that the ball or 'player' does not fall off the 2D plane or 'ground' and also to populate the ground with objects the player can pick up.
Tip: Each new game object that is created needs to have its position reset to origin or 0,0,0.
Otherwise you will have created an object that is way out there in space and you will have a lot of trouble finding it :-p
One neat thing is, just how there are project directory folders to organize content under the 'Project' tab...Game Objects can be used to store other Game Objects meaning they can be used as folders.
Back to wall building, we do this by building one wall at a time...
Until we get this:
Now that the four walls are up, we can watch the ball collide with them:
Now we are ready to add the game objects or cubes, then start spreading them around the play area.
We do this by creating a new 3D object named 'Pick Up' and raise it 0.5 in the Y axis, so that it levitates off of our plane.
Wait...what is this? O_____O
(Instructor's cube on left, mine on the right)
Am I missing something or are my laptop graphics that bad? Let's find out.
Hmmm...
In the future, I'll be working off of a desktop with upgraded graphics for developing purposes and will make sure to list those specs (as well as the RAM, processor, etc.).
Back to our game objects!
Last week we used physics to make the ball roll. Now we are adding physics to the pickup objects to make them spin and look interesting.
How will this happen? We write a script to change the Rotation transform X, Y, Z position by one point with each frame that updates.
Then we sit back and watch the magic happen.
From there, we make this cube a prefab and set it as the parent to all of the cube objects (or 'children') that we create. When changes are made to the prefab parent, all of the child game objects will be updated at the same time.
"Test early and test often."







No comments:
Post a Comment