# Unity Physics Samples ## Controls In the *Game* window: - Mouse spring : Click and drag with left mouse - Camera rotate : Click and drag with right mouse - Camera move : W,A,S,D keys ## Debug Display A lot of the demos display extra information as debug display gizmos in the Editor, for example the Query demos (ray cast, distance cast, etc). This display for these gizmos is in the *Scene* not the *Game* window. So keep an eye on both if in doubt: ![Game window](images/LookInSceneWindow.png) ## Scene List | Category | Scene | Description | Level | | | --- | --- | --- | :---: | --- | | Hello World | 1. Hello World.unity | Introductory scene for rigid body setup | Introductory | ![Demo image](images/hello_world.gif) | | Setup | 2a1. Collider Parade.unity | Demo showing various shapes for collision detection | Introductory | ![Demo image](images/collider_parade.png) | | Setup | 2b1. Motion Properties - Mass.unity | Demo showing how to explicitly set mass properties | Introductory | ![Demo image](images/motion_mass.png) | | Setup | 2b2. Motion Properties - Velocity.unity | Setting initial linear and angular velocities | Introductory | ![Demo Image](images/motion_velocity.gif) | | Setup | 2b3. Motion Properties - Damping.unity | Demo showing the effect of linear and angular damping | Introductory | ![Demo Image](images/motion_damping.gif) | | Setup | 2b4. Motion Properties - Gravity Factor.unity | Demo showing the effect of per body gravity multipliers | Introductory | ![Demo Image](images/motion_gravity.gif) | | Setup | 2b5. Motion Properties - Center of Mass.unity | Demo showing the effect of overriding center of mass and inertia tensor | Introductory | ![Demo Image](images/motion_mass_override.gif) | | Setup | 2c1. Material Properties - Friction.unity | Showing effect of different friction material values | Introductory | ![Demo Image](images/material_friction.gif) | | Setup | 2c2. Material Properties - Restitution.unity | Showing effect of different restitution values | Introductory | ![Demo Image](images/material_restitution.gif) | | Setup | ShapesSample.unity | Testing demo for colliders. Turn on / off spawners to test scalability | Introductory | ![Demo Image](images/shapes_sample.png) | | Query | AllHitsDistanceTest.unity | Demo showing results of distance queries between multiple colliders | Introductory | ![Demo Image](images/closest_points_all_hits.gif) | | Query | CastTest.unity | Demo showing the results of collider casting and ray casting | Introductory | ![Demo Image](images/collider_cast_queries.gif) | | Query | ClosestHitDistanceTest.unity | Demo showing results of distance queries | Introductory | ![Demo Image](images/closest_points.gif) | | Joints | 4a. Joints Parade.unity | Demo showing a range of joint types | Introductory | ![Ragdoll](images/joints_sample.png) | | Joints | Ragdoll.unity | Obligatory stack of ragdolls demo | Introductory | ![Ragdoll](images/ragdolls.gif) | | Modify | ModifyBroadphasePairs.unity | Filter out collision by explicitly deleting pairs from broad phase | Advanced | ![Modify broadphase Sample](images/modify_broadphase.png) | | Modify | ModifyContactJacobians.unity | Modify the results of contact generation to produce special effects | Advanced | ![Modify contacts](images/modify_contact.png) | | Modify | ModifyNarrowphaseContacts.unity | Add new user contacts to simulation pipeline | Advanced | No screenshot | | Use Case | CharacterController.unity | User case demo showing a rudimentary FPS character controller | Intermediate | ![Character Control](images/character_control.png) | | Use Case | Pool.unity | Demonstration of calling immediate mode physics | Intermediate | ![Immediate physics](images/immediate_physics.png) | | Use Case | PlanetGravity.unity | Performance demo of asteroids around a planet using SP/HP | Introductory | ![Planet Gravity](images/planet_gravity.png) | | Use Case | RaycastCar.unity | User case demo showing a set of vehicle behaviors | Intermediate | ![Vehicles](images/vehicles.png) |