Creating and Triggering Animations

Similar documents
Workshop BOND UNIVERSITY Bachelor of Interactive Multimedia and Design Beginner Game Dev Character Control Building a character animation controller.

Adding a Trigger to a Unity Animation Method #2

Teacher Cheat Sheet - Game Coding Challenges

Google SketchUp/Unity Tutorial Basics

Creating an Animated Sea Aquarium/Getting Acquainted with Power Point

Game Design Unity Workshop

IAT 445 Lab 10. Special Topics in Unity. Lanz Singbeil

Creating a 3D Characters Movement

Tutorial: Using the UUCS Crowd Simulation Plug-in for Unity

General Directions for Creating a Program with Flash

ANIMATOR TIMELINE EDITOR FOR UNITY

NOTTORUS. Getting Started V1.00

Word 1 Module 2. Word 1. Module 2

introduction Objective Modelling the cover

Blender for Trainz > Table of Contents > Blender Tools > 3D Editor > Edit Mode > Edge Intersect VTX Last updated: October 16, 2015

Exit: These control how the object exits the slide. For example, with the Fade animation the object will simply fade away.

Auto Texture Tiling Tool

Section 28: 2D Gaming: Continuing with Unity 2D

2.2 - Layouts. Bforartists Reference Manual - Copyright - This page is Public Domain

Scratch Lesson 2: Movies Made From Scratch Lesson Framework

How to start your Texture Box Project!

Creating the Tilt Game with Blender 2.49b

TUTORIAL: MoveYourRobot with Unity3D You created your own robot with servo- motors and you are wondering how to control it.

Reporting Center. Primary (Stand-Alone) Interface

Introduction to Unreal Engine Blueprints for Beginners. By Chaven R Yenketswamy

Auto Texture Tiling Tool

How to Locate and Start PowerPoint 2007? Click on Start Click on All Programs Click on Microsoft Office Folder

Mobile Touch Floating Joysticks with Options version 1.1 (Unity Asset Store) by Kevin Blake

3dSprites. v

WinSCP. Author A.Kishore/Sachin

The Shadow Rendering Technique Based on Local Cubemaps

Game Design Unity Workshop

STEP 1: Download Unity

Lesson 3 Creating and Using Graphics

COMS W4172 : 3D User Interfaces Spring 2017 Prof. Steven Feiner Date out: January 26, 2017 Date due: January 31, 2017

Terrain. Unity s Terrain editor islands topographical landscapes Mountains And more

Adobe Flash CS4 Part 3: Animation

VirMuF Manual V 0.5 1

Toon Boom Harmony Advanced V15.0

Tutorial: Getting Started - Flow Graph scripting

Pacman. you want to see how the maze was created, open the file named unity_pacman_create_maze.

1 Ctrl + X Cut the selected item. 2 Ctrl + C (or Ctrl + Insert) Copy the selected item. 3 Ctrl + V (or Shift + Insert) Paste the selected item

Unity Game Development

Dialog XML Importer. Index. User s Guide

The Library is displayed as a window, and its contents are accessed by dragging and dropping onto the Stage.

Adobe Flash CS4 Part 4: Interactivity

User Manual v 1.0. Copyright 2018 Ghere Games

Dataflow Editor User Guide

Author A.Kishore/Sachin WinSCP

Getting Started with ShowcaseChapter1:

The Photo Gallery. Adding a Photo Gallery Page. Adding a Photo Gallery App

Game Design Unity Workshop

Windows 10 Essentials

Apple idvd 11 Tutorial

Creating a Basic Application for DataPlus Mobile November 18, 2015

Flow Sim. Chapter 12. F1 Car. A. Enable Flow Simulation. Step 1. If necessary, open your ASSEMBLY file.

Keynote Basics Website:

BASIC MICROSOFT POWERPOINT

Qwizdom Training Guide Q6 / Q7


Mechanic Animations. Mecanim is Unity's animation state machine system.

Switch between open apps Close the active item, or exit the active app

Double Click in in this space to open the the Calculator/Formula

Plotting Points. By Francine Wolfe Professor Susan Rodger Duke University June 2010

UI Elements. If you are not working in 2D mode, you need to change the texture type to Sprite (2D and UI)

Getting Started in FCS Express for Previous FlowJo Users

CS248 Lecture 2 I NTRODUCTION TO U NITY. January 11 th, 2017

Keynote 08 Basics Website:

Corel Ventura 8 Introduction

MCDOUGAL LITTELL EASYPLANNER USER S GUIDE

Creating a Text Frame. Create a Table and Type Text. Pointer Tool Text Tool Table Tool Word Art Tool

Microsoft Office Outlook 2007: Intermediate Course 01 Customizing Outlook

Menu Symbols. Menu Symbol. Key on Keyboard

TUTORIAL 03: RHINO DRAWING & ORGANIZATIONAL AIDS. By Jeremy L Roh, Professor of Digital Methods I UNC Charlotte s School of Architecture

Start Menu Log off Turn Off Computer Run Search Help and Support

NiceForm User Guide. English Edition. Rev Euro Plus d.o.o. & Niceware International LLC All rights reserved.

Add in a new balloon sprite, and a suitable stage backdrop.

EZware Quick Start Guide

Installing the Software

House Build Tutorial NAME: GRADE: ARTD 240 3D Modeling & Animation Deborah Ciccarelli, Assistant Professor

EFT - Engineering Field Tools

Document Editor Features Available in HTML5. it just makes sense

Creating a Website in Schoolwires

QUICK START GUIDE. Quick Start Guide. This will assist you to setup and distribute content to a StratosMedia Player device in 4 easy steps.

Cruising Sacramento/ A PowerPoint Slide Show (Project #8)

MIXED REALITY (AR & VR) WITH UNITY 3D (Microsoft HoloLens)

ST NICHOLAS COLLEGE RABAT MIDDLE SCHOOL HALF YEARLY EXAMINATIONS February 2016

Getting Familiar with Microsoft Word 2010 for Windows

Terrain. Unity s Terrain editor islands topographical landscapes Mountains And more

You can delete the default blank background by clicking on its Delete button.

2. Write Your Test Questions & Create Interactions Page 12

KIN 147 Lab 06: Ground Reaction Force (GRF) Data Analysis Excel analyses work much better on PCs than on Macs (especially older Macs)

A BEGINNERS GUIDE TO USING ADOBE PREMIERE PRO

Pick up a book! 2. Is a reader on screen right now?! 3. Embedding Images! 3. As a Text Mesh! 4. Code Interfaces! 6. Creating a Skin! 7. Sources!

Module 4: Creating Content Lesson 5: Creating Visualizations Try Now!

CHAPTER 2: USE WINDOWS 7 TO MANAGE FILES AND PROGRAMS AND TO BROWSE THE INTERNET

How to create an animated face

Animate a Character Cards

HP POS Keyboard with MSR

Transcription:

Creating and Triggering Animations 1. Download the zip file containing BraidGraphics and unzip. 2. Create a new Unity project names TestAnimation and set the 2D option. 3. Create the following folders under Assets (folders indented under other folder will be created Sprites Greeteridle Greeterwalk Animations Scripts Scenes 4. Click the File menu, choose Save Scene, name the Scene AnimationScene and save it in the Scenes folder. 5. In the BraidGraphics folder open the GreeterIdle folder. 6. Drag all the single image files into the Greeteridle folder. (Click the first image, hold down the shift key, and click the last image to select a group.) 7. In the BraidGraphics folder open the GreeterWalk folder. 8. Drag all the single image files into the Greeterwalk folder. You will next create game objects that consist of these individual files. This is done by dragging a group of files into the Scene. An Animation will automatically be created. 9. In Unity, open the Greeteridle folder, hold down the Ctrl key and type the letter A to select all the images.

10. Drag this selected group of images onto the scene object in the Hierarchy window 11. A dialog box opens and prompts you to name and save an Animation. A new Animation is being created for your list of images. Name this animation GreeterIdle and save it in the GreeterIdle folder. You see an Animator window open over the Scene window. 12. Click the Scene tab to show the Scene.

13. In the Hierarchy window rename the just added object to Greeter. There were two objects created in the Greeteridle folder. A Greeter Animator and a Greeter Animation. The Animator is the controller for the Animation. 14. Using the above steps for creating the Greeter animation, use the images in the Greeterwalk folder to create another greeter object in the hierarchy and another greeter animation/animator. When you save the Animation name it GreeterWalk. You should now have two objects in the Scene (you may have to drag the second object to the left/right so it does not cover the first object). We will remove this second object because all we want is the Greeter Walk animation. 15. In the Hierarchy window click the name of the new object and press the Delete key. 16. In the Greeterwalk and Greeteridle folders drag the animations GreeterWalk and Greeteridle into the Animations folder. We will next create conditions on the Animator to switch between the idle and walk animations. 17. Click the Animator tab next to the Scene tab to show the Animator window.

This shows the Greeteridle animation and under what conditions it will be run. In this case, the Entry box indicates that the idle animation will start when the object (greeter) is first displayed. We want to add the second animation to this animator and set transition conditions. 18. Click in the Animations folder. You see the two animations created earlier. Drag the greeterwalk animation into the Animator window and drop it just above the Greeteridle block. Before adding transition logic you need to set a Parameter on the animation. 19. Click the Parameters tab in the animator window to select this option:

20. Click the plus symbol to add a parameter and choose Bool as the data type. 21. For the parameter name type standing and press Enter. 22. Click the check box next to this parameter to set the value to True. It should look like: You will next set transitions between these two animations. 23. Right click the greeteridle box in the Animator and choose Make Transition. 24. Move the mouse over the Greeterwalk animation and click. You see a transition arrow running from the idle to the walk animation. 25. Right click the mouse on the greeterwalk animation box, click the right mouse button, and choose Make Transition.

26. Move the mouse back over the greeteridle animation and click. You should now have to arrows between these two animations. 27. Click the arrow from the greeteridle to the greeterwalk animation blocks. The arrow turns blue since it is selected. 28. In the Inspector area uncheck the option Has Exit Time. 29. In the inspector window, under the conditions area, click the plus symbol to add a condition. You see the parameter named standing with the Boolean value true in a drop-down menu. This describes the condition under which the animation switches from the idle animation to the walk animation. We want to set this condition to False. That is, when the standing value is false then the animation switches to walk. Change the parameter value to false. 30. Click the other transition from the walk animation to the idle animation blocks.

31. In the inspector window for this transition, uncheck the Has Exit Time and add a condition for standing to be true. 32. Run your program with the Animator window open. In the game window you see the greeter idle animation. In the animator window when you click the Standing parameter check box to turn on and turn off the parameter value you notice the animation change to walking. Moving with a Script You will next create a Script to move your object. 1. Right click the Scripts folder and create a new C# Script. 2. Name this script greetermove and double click the script to open it in the editor window. You want this script to do three things, move the figure left/right if the keyboard or controller is pressed, flip the image if the left/right keys are pressed, and swap the animation. 3. Edit the script so it looks like: This will move the figure left/right. 4. Drag the script and drop it on the Greeter object in the hierarchy window. 5. Run your scene and move the figure around the screen. You will next add the animation switch. If the x value of the pos vector is zero then the object is not moving and the animation should be set to idle. If the x value of pos is not zero then it is moving.

6. Edit the script so it looks like: You first define an Animator variable to hold the Animator object associated with this Greeter object. You then get a reference to this Animator object in the Start() method using the GetComponent<Animator>() command. In the Update() method you check the value of the Vector3 object pos. If the x value is zero (the object is not moving left or right) you use the SetBool method on the animator object to set the parameter to true or false. Notice that the name used in the SetBool command is the same name you used when you set the parameter on the Animator. 7. Save your script and run your scene. The greeter now switches between animations when the arrow keys are held down. You will next flip the image on the X axis. This is done by using the command transform.localscale being set to a positive or negative value. In order to do this you must add a facingright flag (Boolean) and then swap the localscale value. You can only add a new localscale value and not directly edit the existing value.

Edit your code so it looks like the following: