Download presentation
Presentation is loading. Please wait.
1
Adding and Manipulating Objects
Unit 1: Scene Setup Adding and Manipulating Objects
2
Starting a New Project When you open Alice 3, you’ll see this window.
You will need to either open up a project that you have already created, or start a new project. To start a new project, choose one of the templates (backgrounds)
3
Starting a New Project This is the main screen for Alice 3.
The programming will happen on this screen, but before we get to that we will have to put some objects into the scene. Click on Setup Scene
4
The Scene Editor At the bottom of this screen is the gallery where all of the possible objects are found. Browse by hierarchy means by if/how an objects moves. Browse by theme and group have collections of objects. You can also search for an object by name or add a shape or text.
5
Adding Objects Two ways to add objects: Click on the object
The object will be added to the middle of the scene. Drag and drop the object where you want it. Name the object – either use the default or rename, but be careful not to use the same name twice!
6
Manipulating Objects Every object in Alice is 3-D
Width, height, and depth The different handle styles let you move, rotate, and resize objects. Try each of them to see what they do!
7
Manipulating Objects The objects have body parts that can be manipulated as well. Use the drop down menu to choose the body part. Use the handles to turn, bend, or resize the body part.
8
Exercise 1 – Witch’s Cauldron
Go to File-New to create a new project. Choose the Dirt template as a background. Click on Setup Scene to enter the Scene Editor Find the Cauldron (either by hierarchy-prop or by search) in the gallery and click to add it to the scene. Leave the default name.
9
Exercise 1 – Witch’s Cauldron
5. Change the color of the cauldron to blue by using the drop-down next to Paint.
10
Exercise 1 – Witch’s Cauldron
6. Move the cauldron to the left side of the scene by using the Translate handle. 7. Add the cauldron lid to the scene by using the search. Leave its name as the default.
11
Exercise 1 – Witch’s Cauldron
8. Move the cauldron lid onto the cauldron: Right click on this.cauldronLid in the object tree. Choose procedures, place, above, and cauldron.
12
Exercise 1 – Witch’s Cauldron
9. Make the cauldron lid move with the cauldron. Make sure the lid is selected. Change the vehicle property to cauldron.
13
Exercise 1 – Witch’s Cauldron
Find the witch in the gallery and add her to the scene. Resize her to make her bigger. Rotate the witch to make her face the cauldron. Save the file to your OneDrive. Make a folder for Computer Programming and a folder within it called Unit 1. Name the file “Witch Cauldron”.
14
Exercise 2 – Card Game Setup
We will now set up a new scene that will eventually become a card game. In this setup we will practice using the position and size boxes and adding text and shapes to the scene.
15
Exercise 2 – Card Game Setup
The problem: create a trimmed version of a card game. 2 Players will each be dealt a card, and the player with the highest card wins. Right now we are setting the scene. We need text that displays the score for each player, and cones to set the locations for the cards to be dealt to.
16
Exercise 2 – Card Game Setup
Start a new file with the grass template. File - Save As – “CardGame” in Unit 1 of your Computer Science OneDrive Folder. Go to the scene setup and browse by theme in the gallery. Click on fantasy, then castle, then new CastleWall. Choose the first choice to add to the scene.
17
Exercise 2 – Card Game Setup
Choose the same castle wall again to add a second wall. (It will be placed right on top of the first.) Move this piece using the position. Change the x location to be and press ENTER. The wall should move to the left.
18
Exercise 2 – Card Game Setup
Choose the Shapes/Text tab and select new TextModel and drag it into the scene. Name the text model as player1Sign. Change the value of the text by choosing custom textString and then typing “Player 1”.
19
Exercise 2 – Card Game Setup
We will resize and move the sign using the right side of the screen. Change the width to be 1 and press ENTER. Change x to 1.5, y to 1.5, and z to -3.0, pressing ENTER after each.
20
Exercise 2 – Card Game Setup
Repeat the process in steps #6-10 to add the following TextModels at the following locations: player2Sign – “Player 2” – x: -1.5, y: 1.5, z: -3.0, width: 1 player1Win – “WIN!!” – x: 1.5, y: 1.0, z: -3.0, width: 1 player2Win – “WIN!!” – x: -1.5, y: 1.0, z: -3.0, width: 1 player1Score – “Score: 0” – x: 1.5, y: 0.5, z: -3.0, width: 1 player2Score – “Score: 0” – x: y: 0.5. z: -3.0, width: 1
21
Exercise 2 – Card Game Setup
Two placement cones will be needed as markers for the playing cards. Find cones in the Shape gallery. cone1 - x: 0.5, y: 0.0, z: -3.0, width: 0.25 cone2 - x: -0.5, y: 0.0, z: -3.0, width: 0.25
22
Exercise 2 – Card Game Setup
We need to place another cone far off the scene. Since the camera will be moving, it will help to place a camera marker to remember this position. Click on the triangle beside Camera Markers, then Add Camera Marker. Name this marker as originalCamera and make it RED.
23
Exercise 2 – Card Game Setup
Click on the first camera arrow at the bottom of the scene. Choose the LEFT arrow to scroll to the left, far enough to place a cone to the left of the wall. coneOutside – x: 8.0, y: 0.0, z: -3.0, width 0.25
24
Exercise 2 – Card Game Setup
Now we need to place the cards at this position. Browse the gallery by hierarchy and choose Biped. Find PlayingCard, and scroll to the right for PlayingCard(ONE 1). Name it playingCard1. Change the width to be Click on one shots drop down, choose procedures, then moveTo, and then coneOutside.
25
Exercise 2 – Card Game Setup
Repeat this procedure to place nine more cards (from PlayingCard (TWO2) to PlayingCard (TEN10)). Be sure to change the widths to 0.5 and move each card to the coneOutside.
26
Exercise 2 – Card Game Setup
To return to the original camera view, change the object to camera, then choose one shots, procedures, moveTo, and originalCamera. Be sure to save this final version of CardGame. We will return to it later to make the game run.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.