Cláudia Ribeiro PHYSICS

Similar documents
Adding a Trigger to a Unity Animation Method #2

Game Design Unity Workshop

if(input.getkey(keycode.rightarrow)) { this.transform.rotate(vector3.forward * 1);

Unity3D. Unity3D is a powerful cross-platform 3D engine and a user friendly development environment.

UNITY WORKSHOP. Unity Editor. Programming(Unity Script)

Game Design Unity Workshop

Pong in Unity a basic Intro

Auto Texture Tiling Tool

Damaging, Attacking and Interaction

Unity Animation. Objectives. Animation Overflow. Animation Clips and Animation View. Computer Graphics Section 2 ( )

Game Design From Concepts To Implementation

Auto Texture Tiling Tool

Setting up A Basic Scene in Unity

Game Design Unity Workshop

Basic Waypoints Movement v1.0

Geometry proxies (in 2D): a Convex Polygon

Dice Making in Unity

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

Workshop BOND UNIVERSITY. Bachelor of Interactive Multimedia and Design. Asteroids

Tutorial Physics: Unity Car

Google SketchUp/Unity Tutorial Basics

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

Design of a dynamic simulation system for VR applications

OCR Maths M2. Topic Questions from Papers. Projectiles

Unity Game Development

User Guide. v1.0. A-Lab Software

Integrating Physics into a Modern Game Engine. Object Collision. Various types of collision for an object:

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

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

Unity Scripting 4. CS 491 / DES 400 Crea.ve Coding. Computer Science

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

Merging Physical and Virtual:

C# for UNITY3d: Sem 1 a.k.a. The Gospel of Mark Part 1

ReactPhysics3D library User Manual

Transforms Transform

Lec 10 MEL for Dynamics

Creating a 3D Characters Movement

ANIMATOR TIMELINE EDITOR FOR UNITY

Chart And Graph. Features. Features. Quick Start Folders of interest Bar Chart Pie Chart Graph Chart Legend

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

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

Lesson 1: Introduction to Pro/MECHANICA Motion

A simple example. Assume we want to find the change in the rotation angles to get the end effector to G. Effect of changing s

CMSC 425 Programming Assignment 1, Part 2 Implementation Notes

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

How to add new 3D Models to Machines Simulator 3 & Machines Simulator VR

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

Introduction to Unity. What is Unity? Games Made with Unity /666 Computer Game Programming Fall 2013 Evan Shimizu

Contents Interior Mapping & Transistions... 1

Actions and Graphs in Blender - Week 8

Chapter 19- Object Physics

SimTenero Particle Physics

+ Typed Message [Vlissides, 1998]

This allows you to choose convex or mesh colliders for you assets. Convex Collider true = Convex Collider. Convex Collider False = Mesh Collider.

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

UFO. Prof Alexiei Dingli

U9_Collision( 碰撞 ) 龍華科技大學多媒體與遊戲發展科學系林志勇編輯請勿外流轉載, 上傳網路 林志勇

Tutorial: Getting Started - Flow Graph scripting

Welcome to JigScript!

Class Unity scripts. CS / DES Creative Coding. Computer Science

Unity introduction & Leap Motion Controller

Basic Kismet Tutorial. An Unreal Development Kit Tutorial. Jesse Walter

Dialog XML Importer. Index. User s Guide

Airship Sub & Boat Tutorial. Made by King and Cheese

Dungeons+ Pack PBR VISIT FOR THE LATEST UPDATES, FORUMS, SCRIPT SAMPLES & MORE ASSETS.

Simulation (last lecture and this one)

Pong. Prof Alexiei Dingli

Coin Pusher Pro Asset - README

COMP30019 Graphics and Interaction Input

SolidWorks Motion Study Tutorial

2.5 Animations. Applications. Learning & Teaching Design User Interfaces. Content Process ing. Group Communi cations. Documents.

2.5 Animations. Contents. Basics. S ystem s. Services. Usage. Computer Architectures. Learning & Teaching Design User Interfaces.

Spell Casting Motion Pack 5/5/2017

Cloth Simulations. 9.2 Physics - Cloth Simulations

Creating and Triggering Animations

CSE 682: Animation. Winter Jeff Walsh, Stephen Warton, Brandon Rockwell, Dustin Hoffman

Virtual Environments

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Unity

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

This lesson introduces Blender, covering the tools and concepts necessary to set up a minimal scene in virtual 3D space.

Vuforia quick install guide. Android devices and Unity 3D models edition

8K Earth, Moon and Mars Shaders Asset V Documentation

LECTURE 4. Announcements

Introduction. QuickStart and Demo Scenes. Support & Contact info. Thank you for purchasing!

9 Dynamics. Getting Started with Maya 491

CE318/CE818: High-level Games Development

How to Model Friction in SIMPACK

ARCHITECTURE & GAMES. A is for Architect Simple Mass Modeling FORM & SPACE. Industry Careers Framework. Applied. Getting Started.

BCC Comet Generator Source XY Source Z Destination XY Destination Z Completion Time

IAP Manager. Easy IAP Workflow. Copyright all rights reserved. Digicrafts 2018 Document version Support

Simulation in Computer Graphics. Deformable Objects. Matthias Teschner. Computer Science Department University of Freiburg

Burning Laser. In this tutorial we are going to use particle flow to create a laser beam that shoots off sparks and leaves a burn mark on a surface!

SFU CMPT 361 Computer Graphics Fall 2017 Assignment 2. Assignment due Thursday, October 19, 11:59pm

Easy Decal Version Easy Decal. Operation Manual. &u - Assets

User Manual. Version 2.0

Intel RealSense SDK Gesture Sequences Implemented in Unity* 3D

Modeling Cloth Using Mass Spring Systems

An Improved Approach for Mechanics Simulation Based on Game Engine

How to create a network diagram?

Underwater Manager (Optional)

Transcription:

Cláudia Ribeiro PHYSICS

Cláudia Ribeiro Goals: - Colliders - Rigidbodies - AddForce and AddTorque

Cláudia Ribeiro AVT 2012 Colliders Colliders components define the shape of an object for the purpose of physical collisions. These are denominated static colliders: they do not move in response to colisions (e.g. walls, floors, etc) When colliders interact, their surfaces can simulate the properties of a physical material (e.g. ice will be slippery, a rubber ball will offer friction and be bouncy)

Cláudia Ribeiro AVT 2012 Colliders Functions Colliders: Colliders as triggers: Collider Character Controller: A collider configured as a trigger does not behave as a solid object and will simply allow other colliders to pass through.

Goals: Detect collisions with static colliders (as trigger and not trigger) Steps: 1. 2. 3. Create a box: GameObject > Create Other> Cube and add a new tag box in the inspector and assigned it to the object Add Script: Assets->Create->JavaScript or C# and add it to the First Person Controller. use OnControllerColliderHit to detect collisions and hit.transform.tag to only react to the collision with the box (otherwise, it will react to collisions with every object that has a collider, such as walls, floor, etc..)

Cláudia Ribeiro Rigidbodies Is the main component that enables physical behaviour for an object Dynamic colliders - Drag: how much air resistance affects the object when moving (forces) - Angular Drag: how much air resistance affects the object when rotating (torque) - iskinematic: the object will not be driven by physics engine, and can only be manipulated by its transform - Interpolate: Transform is smooth based on previous or next frame. To change this attributes by script: Use transform.rigidbody.[attribute] - Collision Detection: Use Discrete collision detection against dynamic colliders (with a rigidbody) and continuous collision detection against static MeshColliders (without a rigidbody). To adjust physics engine settings: Edit -> Project Settings -> Physics

Goals: Rigidbodies Steps: First Part: 1. 2. Create several primitives: GameObject > Create Other> Cube, Sphere, etc Add a rigidbody (Component -> Physics -> RigidBody) and change the attributes to experiment different behaviors. Second Part: 1. Create a Script: Assets->Create->JavaScript or C# and add it to the object in the scene (cube, sphere, etc). 2. Set the iskinematic to true (RigidBody) and use transform.translate in the Update() function to move your object in the scene. You can also use OnTriggerEnter, etc to maintain the object in the scene

Cláudia Ribeiro AddForce and AddTorque AddForce: applies a force to a rigidbody. As a result it will affect the object movement according to the type of force being applied AddForce(force: Vector3, mode: ForceMode = ForceMode.Force): void; AddTorque: torque is the tendency of a force to rotate an object. In unity this function allows to apply a force around a rotation axis AddTorque(torque: Vector3, mode: ForceMode = ForceMode.Force): void; Force Types: Force: add a continuous force to the rigidbody, using its mass Accelaration: add a continuous accelaration, ignoring its mass Impulse: add na instant force impulse, using its mass VelocityChange: add na instant velocity change, ignoring its mass

Goals: Use AddForce to allow the character controller to push a box Steps: 1. 2. Add the necessary code to the OnControllerColliderHit() function Add a rigidbody (Component -> Physics -> RigidBody) and change the attributes to experiment different behaviors.

Goals: Use AddTorque to continuously rotate an object Steps: 1. 2. 3. 4. Create several primitives: GameObject > Create Other> Cube, Sphere, etc Add a rigidbody (Component -> Physics -> RigidBody) Create a Script: Assets->Create->JavaScript or C# and add it to the object in the scene (cube, sphere, etc). Add the necessary code to the Update() function

Goals: Use a collider to move an object in a contained space Steps: 1. Create an empty gameobject: GameObject > Create Empty 2. Add a Box Container (Component -> Physics -> Box Container) 3. Position the box container and the box (created earlier) in the scene 4. Create a Script: Assets->Create->JavaScript or C# and add it to the box 5. Add the necessary code to the OnTriggerStay() and OnTriggerExit function 6. Try to do the same with a sphere hovering in the Y axis!