A loop Shape is a free form sequence of line segments that form a circular list. The loop may cross upon itself, but this is not recommended for smooth collision. The loop has double sided collision, so you can use inside and outside collision. Therefore, you may use any winding order.
Inheritance: Shape
        public override Shape Clone()
        {
            LoopShape loop = new LoopShape();

            loop.Radius   = Radius;
            loop.Vertices = Vertices;
            loop._density = _density;
            loop.MassData = MassData;
            return(loop);
        }
Ejemplo n.º 2
0
 public override Shape Clone()
 {
     LoopShape loop = new LoopShape();
     loop.Radius = Radius;
     loop.Vertices = Vertices;
     loop._density = _density;
     loop.MassData = MassData;
     return loop;
 }
Ejemplo n.º 3
0
 public static Fixture CreateLoopShape(Vertices vertices, float density, Body body, Object userData)
 {
     LoopShape shape = new LoopShape(vertices, density);
     return body.CreateFixture(shape, userData);
 }