This is how I create the ground:
Code: Select all
BEPUphysics.Entities.Prefabs.Box box = new Box(Position.ConvertPhysics(), 30, 0.9f, 30);
space.Add(box);
And the dynamic boxes are created this way:
Code: Select all
BEPUphysics.Entities.Prefabs.Box box = new BEPUphysics.Entities.Prefabs.Box(position.ConvertPhysics(), 1, 1, 1, 1.0f);
space.Add(box);
This is how I render them:
Code: Select all
ph.model.ParentNode.Position = new Mogre.Vector3(ph.box.Position.X, ph.box.Position.Y, ph.box.Position.Z);
ph.model.ParentNode.Orientation = new Mogre.Quaternion(ph.box.Orientation.W, ph.box.Orientation.X, ph.box.Orientation.Y, ph.box.Orientation.Z);