Here is an overview of samples for DigitalRune Physics.

The following sample applications are distributed with the DigitalRune libraries (see also Files and Folders). All samples are included with full source code and detailed comments.

Note

The drawing routines in DigitalRune Physics Samples are not optimized to keep the source code as simple as possible.

Please keep this in mind if you try to profile the performance of DigitalRune Physics Samples.

This topic contains the following sections.

General Samples

PhysicsSample

This is a simple XNA application. It contains a collection of simple physics examples that introduce all important aspects of DigitalRune Physics, for example:

  • Creating and updating simulations.

  • Creating rigid bodies with different shapes, material and mass properties.

  • Using constraints to grab objects, create ragdolls, etc.

  • Using force effects and creating custom force effects.

  • Loading collision shapes with the XNA content pipeline.

  • And much more...

Here are some screenshots of this sample application

A Wall of Boxes
Creating and destroying a wall of boxes
Different Shapes
Using different shapes
Different Materials
Different material properties
A Custom Gravity Effect
A custom gravity force effect
Rope
A rope/chain with debug visualization of bounding boxes (red), contacts and islands (yellow)
A Suspension Bridge
A suspension bridge
A Height Field
A height field that was created with an XNA Content Processor.
A Complex Triangle Mesh
A large triangle mesh that was created with an XNA Content Processor.
Performance Test
Performance test: A height field with over 1000 rigid bodies.

Windows Phone 7 Samples

PhysicsSample

This sample shows how to use DigitalRune Physics on a Windows Phone 7. Including gestures, camera tilt using the accelerometer and force-feedback for collisions.

Physics on Windows Phone 7
PhysicsSample for the Windows Phone 7

RagdollSample

This sample simulates a ragdoll with breakable joints. Shake the phone to throw the ragdoll.

Ragdoll on Windows Phone 7
RagdollSample for the Windows Phone 7

Avatar Samples

This sample shows how animate Xbox LIVE Avatars on Xbox 360 using ragdoll physics. The ragdolls can also blend keyframe animations and ragdoll physics.

Sample-Avatar-Ragdoll
Avatar Samples

Character Controller Sample

This sample shows how to use a character controller to compute avatar navigation. The character can step over obstacles, slopes, climb, jump, crawl, stand on moving platforms, push objects, hang on ledges, etc.

Character Controller
Character Controller Sample

Vehicle Sample

This sample shows how to use vehicle physics to simulate a car.

Sample-Vehicle
Vehicle Sample

More Articles and Samples

For more articles and samples visit the DigitalRune Website. Check out the blog, forum and documentation pages.

See Also

Other Resources