Unity 3 D Physics April 3 2015 Comp
- Slides: 32
Unity 3 D Physics April 3, 2015 Comp 150 - Game Design Michael Shah
Physics Topics ● Physics Games o Couple studies of physics gone well ● Physics as the main mechanic o Case study of games ● Unity 3 D Physics o Tweaking Physics ● Physics Engines o Further items to look at (and appreciate physics)
Realistic Physics ● Goal is to simulate the real world as close as possible.
Realism on a sliding Scale ● Trials HD ● Tony Hawk Pro Skater
Cartoon Physics ● Angry Birds ● Flappy Bird ● Mario
Another reason to Love Unity
Physics as A Mechanic ● Half-Life 2 Gravity Gun ● Portal
Why we need good Physics https: //youtu. be/NYt 3 B 9 lc. Um 0? t=4 m 49 s (This game was probably never tested!)
Unity Physics - The Basics ● Built on top of Nvidia’s Phys. X System ● Lets look at the built in components
Colliders ● Box, Sphere, Capsule, and Mesh o On. Collision. Enter, On. Collision. Exit, On. Collision. Stay ● Colliders as Triggers ● On. Trigger. Enter, On. Trigger. Exit, On. Trigger. Stay Detecting a Collision requires at least one of the colliding objects to have a: void On. Collision. Enter(Collider col) method. o
Mesh Collider Example
Mesh Collider Example
Rigid Body ● Used for moving objects ● Gameobject is effected by Gravity
Force and Torque ● Add Force o Change movement of object ● Add Torque o Rotate object around axis.
Physic Materials ● Physics Materials effect the way the object reacts in the game engine (Basketball versus bowling bowls surface). Dynamic friction: Effects the object as it moves. o Static Friction: How much force is needed to move an object from a static position (sticky glue-like). o Bounciness: self-explanatory o Friction and Bounce Combine: How to respond to another object during collision. o
Joints ● Fixed o Does not move until break force exceeded ● Spring o Hooke’s Law ● Hinge o Doors
Raycasting ● Raycasting: The process of shooting an invisible ray from a point to a specified direction into any colliders. o Use Debug. Draw. Ray to see where you are casting a ray
Raycast Against Specific Game. Objects
Puzzles ● Some Exercises to walk through o o How would you implement the scene? What types of objects would you construct? § What does the hierarchy look like?
Puzzle #1 - Destructible Wall https: //www. youtube. com/watch? v=Ij. ELu_Q 01 e. Q
Puzzle #2 - Wrecking Ball https: //www. youtube. com/watch? v=o. AWGs 0 kt_v. M
Puzzle #3 - Trampoline http: //forum. unity 3 d. com/threads/trampolinebouncy-spring-please-help. 53181/
Puzzle #4 - Pool of Water https: //www. youtube. com/watch? v=m. Dtn. T 5 fh 7 Ek
Puzzle #5 - Ragdoll
Puzzle #6 - Destructible Objects https: //www. youtube. com/watch? v=IXl. A 3 HSIDPg
Puzzle #7 - Improve Performance of Complicated Geometry http: //unity 3 d. com/learn/tutorials/modules/inter mediate/physics-best-practices
Answer - Physics Manager
Best Practices ● Remember that 2 D is different than 3 D in Unity o All of those puzzles, the same features apply, but use the 2 D components! ● http: //devmag. org. za/2012/07/12/50 -tips-forworking-with-unity-best-practices/ o 9. Put your world floor at y = 0. This makes it easier to put objects on the floor, and treat the world as a 2 D space (when appropriate) for game logic, AI, and physics.
Physics in Regards to Lighting
Physics in Regards to Animation ● Integrate Maya into the pipeline ● ‘Apply Root Motion’ powers animated objects based on animation o No need to move Transform or add Force
Animation as an Agent-Based System ● Flocking Behavior o o Physics - Attract and Repel Objects https: //www. youtube. com/watch? v=EZEK 1 l. Xx. Ff. A Crowd Simulation ● Particle System ●
Appreciating the built-in Physics Three Books to build your own physics engine
- Physx vs havok
- Why does it happen
- University physics with modern physics fifteenth edition
- Good physics ia topics
- January february march april
- Bondservants motorcycle
- 26 april 1564
- Earth day paragraphs
- Pcb alignment pin
- 535 days before 23 april
- Spelling tic tac toe homework
- Tornado outbreak of april 20, 2004
- April goth
- April art project
- April fleming
- April rustianto
- Pada tanggal 1 april 2011 cv seneng makmur
- 24 april 2007
- April 23rd 1616
- April 4
- Site:slidetodoc.com
- April christian
- Guten morgen freitag 1 april
- 23 april international children's day turkey
- April 28 day of mourning
- April ford incentives
- April rain song
- April 6 1992
- 20.april 1889
- April savoy allstate
- School year 2005
- 27 april 2001
- April ericsson