using OpenSim.Region.Physics.BulletSPlugin; // create a new bullet physics world BulletWorld bulletWorld = new BulletWorld(); // configure the world settings bulletWorld.SolverType = BulletWorld.SolverType.SequentialImpulse; bulletWorld.Gravity = new BulletXNA.Vector3(0, -9.81f, 0); // add a rigid body to the world BulletXNA.Vector3 position = new BulletXNA.Vector3(0, 10, 0); BulletXNA.Quaternion rotation = BulletXNA.Quaternion.Identity; var rigidBody = bulletWorld.AddRigidBody(10, position, rotation);
using OpenSim.Region.Physics.BulletSPlugin; // create a new bullet physics world BulletWorld bulletWorld = new BulletWorld(); // simulate the world for 500 milliseconds const float simulationTimeStep = 1.0f / 60.0f; const float simulationDuration = 0.5f; float simulationTime = 0; while (simulationTime < simulationDuration) { bulletWorld.Step(simulationTimeStep); simulationTime += simulationTimeStep; }This example shows how to simulate the physics world for a given duration by calling its `Step` method at regular intervals. Package library: OpenSim.Region.Physics.BulletSPlugin