Example #1
0
        public override Composite MakeComposite()
        {
            Composite composite = new Composite();

            composite.AddRenderingGroup(new SimRenderer.SimRenderingGroup(2, new List <int>()));
            composite.AddRenderingGroup(new SimRenderer.SimRenderingGroup(0, new List <int>()));
            composite.AddRenderingGroup(new SimRenderer.SimRenderingGroup(1, new List <int>()));

            Particle root = new Particle(Vector2.zero, particleDamping);

            // composite.renderingGroups[1].indices.Add(composite.elemNum);
            composite.AddSimElement(new PinConstraint(root));
            Particle next = MakeLimb(composite, root, 1f, Mathf.PI * 0.5f);

            composite.AddSimElement(new PinConstraint(next));

            return(composite);
        }