Nothing Special   »   [go: up one dir, main page]

Unity 3 D

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 30

Unity3D

https://unity3d.com/

Mayur Thorve

Akshay Patil
 Download at https://store.unity.com/
 Free for students and company < $100,000/y
 Supporting multi-platforms.

INSTALLATION
GETTING STARTED WITH A SIMPLE UNITY3D PROJECT
 start Unity3D

 New Project (3D or 2D)

 File->Save Scene
 GameObject->3D object->sphere
 Edit->Frame Select (to show the created object)
 Hold onto the arrows to move the sphere or change the position in the
Inspector.
 Note: Y is up.

OBJECT CREATION
 Inspector and transform panel

 Hand Tool: Click and drag to move scene and navigate


world
 Move Tool: Move objects within the world (X, Y, Z)
 Rotate Tool: Rotate objects along the X, Y, or Z axis
 Scale Tool: Scale object’s size either along an axis, or
overall
 Rect Tool: Mainly used for 2D games and UI elements
 Universal Tool: Has functionality to move, rotate, and
scale
UNITY 3D: COMPONENT

Select Created Game Object->Component->Physics-


>Rigidbody

• Rigid Objects: non-deformable with physical properties


(gravity, inertial).

• Non-rigid Objects:
• Deformable: changeable geometry
• Breakable: changeable topology.

• Intangible Objects: No predefined shape.


fire, clouds, …
ANIMATION

 Window->Animation
 Click on the object to
be animated.
 Component-
>Miscellaneous-
>Animation
ANIMATION

 Create New Animation Clip


 Click on the record button (red) at the top-left.
 Save the new animation clip file.
 Click on Curves.
 Select Add Property->transform  position, rotation or scaling
 Add key frame on the timeline as many as you want.

 Click on the red button again to finish making the


animation clip.

ANIMATION
ANIMATION (UNITY5)
 Add key frame on the timeline as many as you want.
 Click on the red button again to finish making the
animation clip.
ANIMATION

 Go back to Unity window.


 Under Inspector  Animation , change the name of
animation clip from none to the one that you have
made.
UNITY 3D: LIGHT

• Game Object ->Light -> Directional Light (Default)

• Move and rotate just like any other object.


PHYSICS

 Unity3D provide Physics library.


- Rigidbody, collider, joint, force and etc.

 Rigidbody component : gravity automatically added

 Collision detection : box, sphere, capsule , mesh, whele and


terrain.

 Collision call back function : OnCollisionEnter,


OnCollision and OnCollisionExit.
PLAYER (FOR A THIRD-PERSON GAME)
• Make sure to save the scene “File->Save Scene” (Ctrl
S”) and save the project
“File->Save Project”
• Next, we need add the player.
• In the Project window, drag“Standard Assets-
>Character Controllers->3rd Person Controller”
to the Hierarchy window.
• In the Hierarchy window, double-click on the 3rd
Person Controller.
• Click on the “Move selected object” icon. Then
move the controller to the top of the terrain. You
may have to adjust your view angle by clicking on
the ‘xyz” icon to see the position. Click the middle of
the icon to get the perspective view.
UNITY 3D: SCRIPTS
Languages:

 Interpreted : Java Script


 Compiled: C#
Usages:

 General: under Project\Scripts


 ExitOnEscape.cs
 Objects: attached to objects

 ThirdPersonController.js
UNITY 3D: LIBRARY

cashe:

 for speeding up processing


metadata:

 data that describes data


previews:

 for previewing scenes


ScriptAssemblies:

 compiled object assemblies for scripts



 http://www.turbosquid.com
 Autodesk Maya
http://www.autodesk.com/products/autodesk-
maya/overview
 Blender
http://www.blender.org

RESOURCES FOR 3D MODEL


INTERFACE
HIERARCHY
CREATE A CUBE
SCENE/GAME VIEW
INSPECTOR
PROJECT WINDOW
 Demo in Unity
 Scale window size
 Change window locations

MOVING WINDOWS TO MAKE


CUSTOM LAYOUTS
ADDING ASSET STORE AS A WINDOW
 Demo in Unity
 Navigate to Props
 Sort by FREE assets
 Find asset pack (Low Poly Survival Essentials)
 Download/Import pack

IMPORTING ASSETS FROM STORE


 In the Project Window, navigate to :
 Assets/BrokenVector/LowPolySurvivalEssentials/Prefabs
 Drag and drop Terrain_Plane and set location to (0,0,0)
 Add objects for fun 
 Move camera to see scene in Game View

ADDING OBJECTS TO SCENE


 Use Empty Game Objects to create a “Folder Structure”

Before After

SCENE MANAGEMENT
 Prefabs are a valuable resource to use in developing
your scene
 A prefab is an object or a group of objects that can be
saved for easy use and manipulation
 Demo in Unity

USING PREFABS

You might also like