Exemplo n.º 1
0
        public void Test_CreateBulletObject()
        {
            var cap = new CapsuleShape (1, 2);

            Assert.IsNotNull (cap.CreateGhostObject ());
            Assert.IsNotNull (cap.CreateRigidBody (1));
            Assert.IsNotNull (cap.CreateBulletShape ());
        }
Exemplo n.º 2
0
        public void Test_CreateShape()
        {
            var box = new CapsuleShape (1, 2);
            var shp = box.CreateBulletShape () as BulletSharp.CapsuleShape;

            var height = shp.HalfHeight * PhysicsSimulator.PPM;
            var radius = shp.Radius * PhysicsSimulator.PPM;

            Assert.AreEqual (1, radius);
            Assert.AreEqual (1, height);
        }