Ejemplo n.º 1
0
        public override void Initialize()
        {
            var model = GetModelFromOwner();
            var size  = MeasureMesh(model);

            Entity = new Cylinder(
                MathConverter.Convert(Manager.Owner.Location),
                size.Y,
                size.X / 2,
                Mass);

            if (Mass <= 0)
            {
                Entity.BecomeKinematic();
            }
            else
            {
                Entity.BecomeDynamic(Mass);
            }

            base.Initialize();
        }