Universe.Physics.BulletSPlugin.BSAPIXNA.BuildCapsuleShape C# (CSharp) Method

BuildCapsuleShape() public method

public BuildCapsuleShape ( BulletWorld pWorld, float pRadius, float pHeight, System.Vector3 pScale ) : BulletShape
pWorld BulletWorld
pRadius float
pHeight float
pScale System.Vector3
return BulletShape
        public override BulletShape BuildCapsuleShape(BulletWorld pWorld, float pRadius, float pHeight, Vector3 pScale)
        {
            DiscreteDynamicsWorld world = (pWorld as BulletWorldXNA).world;
            IndexedVector3 scale = new IndexedVector3(pScale.X, pScale.Y, pScale.Z);
            CapsuleShapeZ capsuleShapeZ = new CapsuleShapeZ(pRadius, pHeight);
            capsuleShapeZ.SetMargin(world.WorldSettings.Params.collisionMargin);
            capsuleShapeZ.SetLocalScaling(ref scale);

            return new BulletShapeXNA(capsuleShapeZ, BSPhysicsShapeType.SHAPE_CAPSULE);
            ;
        }
BSAPIXNA