Пример #1
0
 private static UnityEngine.Vector3[] CreateBox2DShape(Box2DShape box2DShape)
 {
     Vector3Array v = box2DShape.Vertices;
     return new UnityEngine.Vector3[12]
     {
         v[0].ToUnity(), UnityEngine.Vector3.forward,
         v[1].ToUnity(), UnityEngine.Vector3.forward,
         v[2].ToUnity(), UnityEngine.Vector3.forward,
         v[0].ToUnity(), UnityEngine.Vector3.forward,
         v[2].ToUnity(), UnityEngine.Vector3.forward,
         v[3].ToUnity(), UnityEngine.Vector3.forward,
     };
 }
Пример #2
0
 public static void CreateBox2DShape(Box2DShape shape, Mesh mesh)
 {
     Vector3Array v = shape.Vertices;
     MakeUnityCubeMesh(v[0].ToUnity(), v[1].ToUnity(), v[2].ToUnity(), v[3].ToUnity(), v[4].ToUnity(), v[5].ToUnity(), v[6].ToUnity(), v[7].ToUnity(), mesh);
 }
Пример #3
0
 private static Vector3[] CreateBox2DShape(Box2DShape box2DShape)
 {
     Vector3Array v = box2DShape.Vertices;
     return new Vector3[12]
     {
         v[0], Vector3.UnitZ,
         v[1], Vector3.UnitZ,
         v[2], Vector3.UnitZ,
         v[0], Vector3.UnitZ,
         v[2], Vector3.UnitZ,
         v[3], Vector3.UnitZ,
     };
 }