Skip to content

Latest commit

 

History

History
64 lines (58 loc) · 10.7 KB

File metadata and controls

64 lines (58 loc) · 10.7 KB

Unity Physics Samples

In the Game window:

  • Drag objects: click and drag with left mouse
  • Rotate camera: click and drag with right mouse
  • Move camera: WASD keys

NOTE: Many of these samples display extra information as debug display gizmos in the Editor. For example, the Query samples display raycasts as debug lines that are only visible when Gizmos are enabled.

Scene List

Scene Description Level
1. Hello World /
Hello World
Objects with convex hull colliders Demo image
1. Hello World /
Sphere and Box Colliders
Objects with sphere and box colliders Demo image
2. Gravity Well /
Gravity Well
Two objects rotating around a center and smaller objects gravitating to the larger two. Demo image
3. Collider Geometry /
Collision Parade - Basic
The basic collider shapes Demo image
3. Collider Geometry /
Collision Parade - Advanced
Colliders of all shapes, including compound colliders Demo image
4. Motion Properties /
Mass
Overriding mass Demo image
4. Motion Properties /
Velocity
Objects that spawn with a set initial linear and angular velocity Demo Image
4. Motion Properties /
Damping
Linear and angular damping Demo Image
4. Motion Properties /
Gravity Factor
Per-body gravity multipliers Demo Image
4. Motion Properties /
Center of Mass
Overriding center of mass Demo Image
4. Motion Properties /
Inertia Tensor
Overriding inertia tensor Demo Image
4. Motion Properties /
Smoothing
Objects with either interpolation, extrapolation, or neither Demo Image
5. Material Properties /
Friction
Objects with different friction strength sliding down a slope Demo Image
5. Material Properties /
Restitution
Falling objects with different restitution (fancy word for bounciness!) Demo Image
5. Material Properties /
Collision Filters
Objects only collide with other objects belonging to the matching material collision filter Demo Image
6. Events /
Collisions
Detecting object contact with a trigger surface Demo Image
6. Events /
Contacts
Object repelled upon hitting a trigger volume Demo Image
6. Events /
Triggers
Objects reverse gravity upon entering trigger volume Demo Image
6. Events /
Triggers - Change Material
Objects change material upon entering trigger volume Demo Image
6. Events /
Triggers - Force Field
Objects float upward when inside moving trigger volume Demo Image
6. Events /
Triggers - Portals
Teleport an object from one portal to another upon contact Demo Image
7. Query /
All Distances
Query for the distance between the colliders for each collider vertex Demo Image
7. Query /
Closest Distance
Query for closest distance between two colliders Demo Image
7. Query /
Cast
Collider casting and ray casting Demo Image
7. Query /
Custom Collector
Raycast with custom filtering Demo Image
8. Joints and Motors /
Joints - Parade
All joint types Demo Image
8. Joints and Motors /
Joints - Limit DOF
Limiting degrees of freedom Demo Image
8. Joints and Motors /
Joints - Ragdolls
Obligatory stack of ragdolls Ragdoll
8. Joints and Motors /
Motors - Parade
All motor types Demo Image
8. Joints and Motors /
Motors - Position
Position motors Demo Image
8. Joints and Motors /
Motors - Linear Velocity
Linear velocity motors Demo Image
8. Joints and Motors /
Motors - Angular Velocity
Angular velocity motors Demo Image
8. Joints and Motors /
Motors - Rotational
Rotational motors Demo Image
9. Modify /
Motion Type
Dynamically modifying motion type Demo Image
9. Modify /
Box Collider Size
Dynamically modifying collider size Demo Image
9. Modify /
Collider Type
Dynamically modifying collider type Demo Image
9. Modify /
Velocity
Modifying velocity Demo Image
9. Modify /
Kinematic Motion
Moving kinematic objects that collide with dynamic objects Demo Image
9. Modify /
Surface Velocity
Dynamically modifying surface velocity Demo Image
9. Modify /
Collider Filter
Dynamically modifying collider filters Demo Image
9. Modify /
Scale
Dynamically modifying scale Demo Image
9. Modify /
Impulse
Applying impulses Demo Image
9. Modify /
Broadphase Pairs
Filter out collision by explicitly deleting pairs from the broad phase Modify broadphase Sample
9. Modify /
Contacts
Dynamically modifying the results of contact generation to produce special effects Modify contacts
9. Modify /
Narrowphase Contacts
Dynamically add new contacts in narrowphase Modify Narrowphase contacts
10. Character Controller /
Character Controller
A rudimentary 3rd-person character controller Character Control
11. Immediate Mode /
Pool
A pool game that uses "immediate mode" to project the ball movements before the shot is taken Immediate physics
12. Planet Gravity /
Planet Gravity
Stress test of many asteroids orbiting a planet Planet Gravity
13. Raycast Car /
Raycast Car
Drivable vehicles Raycast Car