Beispiel #1
0
        void InitFriction()
        {
            const float bs = 2;
            const float ts = bs + bs / 4;

            for (int i = 0, ni = 20; i < ni; ++i)
            {
                Vector3  p   = new Vector3(-ni * ts / 2 + i * ts, bs, 40);
                SoftBody psb = CreateSoftBox(p, new Vector3(bs, bs, bs));
                psb.Cfg.DF = 0.1f * ((i + 1) / (float)ni);
                psb.AddVelocity(new Vector3(0, 0, -10));
            }
        }