Building a Game with Unity3D

Slides:



Advertisements
Similar presentations
JavaScript Objects - DOM CST 200 JavaScript. Objectives Introduce JavaScript objects Introduce Document Object Model Introduce window object Introduce.
Advertisements

2.3. B OUNDING V OLUMES Bounding volumes of use for collision detection.
INNER WORKINGS OF UNITY 3D. WHAT WE ARE GOING TO COVER Intro to Unity Physics & Game Objects Cameras & Lighting Textures & Materials Quaternions and Rotation.
3D Kinematics Eric Whitman 1/24/2010. Rigid Body State: 2D p.
GameCamp! and Game Davis Introduction to Scripting in Unity®
Game Physics Chris Miles. The Goal To learn how to create game objects with realistic physics models To learn how to simulate aspects of reality in order.
3D orientation.
Based on Roll-a-ball video tutorial from Unity Technologies Part WakeUpAndCode.com.
1 Shortcuts for Lazy Programmers! Topics Increment and Decrement Operators Assignment Operators.
The Accelerometer and Gyroscope
3D Concepts Coordinate Systems Coordinates specify points in space 3D coords commonly use X, Y, & Z A vertex is a 'corner' of an object Different coordinate.
Point set alignment Closed-form solution of absolute orientation using unit quaternions Berthold K. P. Horn Department of Electrical Engineering, University.
Unit 3 Vectors and Motion in Two Dimensions. What is a vector A vector is a graphical representation of a mathematical concept Every vector has 2 specific.
Simplex method (algebraic interpretation)
An introduction to the finite element method using MATLAB
Describe motion in terms of frame of reference Express scalar and vector quantities Understand the relationship between scalar and vector quantities.
USING UNITY JAVASCRIPT. CONVENTIONS AND SYNTAX IN JAVASCRIPT Case Sensitivity All keywords like var or function must be in lowercase. All variable names,
Learning Unity. Getting Unity
Sect. 1.3: Constraints Discussion up to now  All mechanics is reduced to solving a set of simultaneous, coupled, 2 nd order differential eqtns which.
Basic 3D Concepts. Overview 1.Coordinate systems 2.Transformations 3.Projection 4.Rasterization.
Problem Solving Methodology Rachel Gauci. Problem Solving Methodology Development Design Analysis Evaluation Solution requirements and constraints. Scope.
Validation using Regular Expressions. Regular Expression Instead of asking if user input has some particular value, sometimes you want to know if it follows.
GameDevClub CODE CHEAT SHEET NOTE: ALL OF THE CODE IS CASE-SENSITIVE AND THE SYNTAX IS STRICT SO A LOT OF YOUR ERRORS WILL PROBABLY COME FROM TYPOS If.
SE 350 – Programming Games Lecture 5: Programming with Unity Lecturer: Gazihan Alankuş Please look at the last slide for assignments (marked with TODO)
WHAT YOU WILL LEARN: To describe polynomials To add and subtract polynomials …And why To combine and simplify polynomials. ADDING AND SUBTRACTING POLYNOMIALS.
Extending a displacement A displacement defined by a pair where l is the length of the displacement and  the angle between its direction and the x-axix.
Fundamentals of Computer Animation Orientation and Rotation.
Vectors. 2 Scalars and Vectors A scalar is a single number that represents a magnitude –E.g. distance, mass, speed, temperature, etc. A vector is a set.
MASKS © 2004 Invitation to 3D vision Lecture 6 Introduction to Algebra & Rigid-Body Motion Allen Y. Yang September 18 th, 2006.
SPACE MOUSE. INTRODUCTION  It is a human computer interaction technology  Helps in movement of manipulator in 6 degree of freedom * 3 translation degree.
Behavior trees & The C# programming language for Java programmers
EEC-693/793 Applied Computer Vision with Depth Cameras
Basic Technologies – Glass Bead
EEC-693/793 Applied Computer Vision with Depth Cameras
Randomising the behaviour of Sprites
Warm Up 3 x 3 x 3 x 3 x 3 x 3 = 4 x 4 x 4 x 4 = -1 x -1 x -1 x -1 =
EEC-693/793 Applied Computer Vision with Depth Cameras
Add, Subtract and Multiply Polynomials
BYOB – Costumes.
Two-Dimensional Motion and Vectors Introduction to Vectors
Applying Geometric Transformations
Objective Solve equations in one variable that contain variable terms on both sides.
Solid Edge ST4 Training Exploding assemblies
Finding Direction Angles of Vectors
Your City Name Goes Here
TE2: Combining Like Terms
Learn to plug in variables to solve problems.
Getting your metadata using PROC METADATA
Building a Game with Unity3D
Week 6: Time and triggers!
Building a Game with Unity3D
READY?.
ICT Gaming Lesson 3.
For this assignment, copy and past the XHTML to a notepad file with the .html extension. Then add the code I ask for to complete the problems.
Unity Terrain Design Tutorial
Objective Solve equations in one variable that contain variable terms on both sides.
Fundaments of Game Design
Unit 6 part 5 Test Javascript Test.
Adding and Subtracting Radicals
Title of Notes: Combining Like Terms & Distributive Property
EEC-693/793 Applied Computer Vision with Depth Cameras
Adding Like Terms Guided Notes
Week 1 - Introduction and Objects
Unity Game Development
Unity Game Development
This is an introduction to JavaScript using the examples found at the CIS17 website. In previous examples I specified language = Javascript, instead of.
Why We Need Car Parking Systems - Wohr Parking Systems
Types of Stack Parking Systems Offered by Wohr Parking Systems
Add Title.
Presentation transcript:

Building a Game with Unity3D

changes to example script var myrigidbody:Rigidbody; // declare a variable of proper type myrigidbody=GetComponent(Rigidbody); // note javascript uses () instead of < > myrigidbody.AddRelativeTorque …  

+make a game with unity +brackeys Unity Basics make a game - 1 make a game - 2 Make a game- 3 make a game - 3b - camera Make a game - 5 - shadows + respawn make a game - 5a - jumping make a game - 6 - quality settings make a game - 7 – collectibles make a game - 8 - animation many more videos: use the search in the title above

moving a sphere function Start () { // saved for posterity     queriesHitTriggers=true;     blue_rotation = Input.GetAxis ("Horizontal") * rotationSpeed * -1 ;     blue_rotation*=Time.deltaTime;     rgdblue= GetComponent (Rigidbody);     rgdblue.velocity = new Vector3 (.1*rotationSpeed * Time.deltaTime, 0) ;     rgdblue.velocity=rgdblue.velocity*-1;     rgdblue.AddRelativeTorque (Vector3.forward * blue_rotation); //vector3 is 3D mgmt } function Update()  {      blue_rotation = Mathf.Abs(Input.GetAxis ("Horizontal") * rotationSpeed ) *-1;     blue_rotation*=Time.deltaTime;     rgdblue=GetComponent(Rigidbody);     rgdblue.AddRelativeTorque (Vector3.forward * blue_rotation); //vector3 is 3D mgmt }

Tips A rotation completely describes an object's absolute orientation (or a change in orientation). A direction specifies which way an object is pointing or facing, NOT it's movement direction (a rotating car on ice can be moving in direction x, but facing direction y.) Rotations and Directions are (not easily) convertible into each other. But they have different characteristics when it comes to combining and comparing them. You can add two Rotations and get a new rotation: 90 degrees + 90 degrees = 180 degrees. But if you add two direction vectors you get a new vector that doesn't express a rotation any more. It is possible to 'convert' a direction to a rotation, but since the mapping is not one-to-one, you have to introduce additional constraints in order to arrive at a unique result. (This is basically what functions like the quaternion LookRotation() function do.) Rotations are Quaternions If you want to rotate around the world's "up" direction, regardless of the object's local coordinate system, you can try adding Space.World as the last argument to Rotate