// Use this for initialization
	void Start ()
	{
		cam = GetComponent<Camera>();
		if(cam == null)
			return;
		projection = cam.projectionMatrix;
		debugView = new FarseerDebugViewUnity(FSWorldComponent.PhysicsWorld);
		debugView.AppendFlags(FarseerPhysics.DebugViewFlags.ContactPoints);
		//debugView.AppendFlags(FarseerPhysics.DebugViewFlags.ContactNormals);
		debugView.AppendFlags(FarseerPhysics.DebugViewFlags.CenterOfMass);
		//debugView.AppendFlags(FarseerPhysics.DebugViewFlags.PerformanceGraph);
		debugView.AppendFlags(FarseerPhysics.DebugViewFlags.DebugPanel);
	}
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     cam = GetComponent<Camera>();
     if (cam == null) {
         Debug.LogWarning("This component must be attached to a camera");
         return;
     }
     projection = cam.projectionMatrix;
     debugView = new FarseerDebugViewUnity(FSWorldComponent.PhysicsWorld);
     debugView.AppendFlags(FarseerPhysics.DebugViewFlags.ContactPoints);
     //debugView.AppendFlags(FarseerPhysics.DebugViewFlags.ContactNormals);
     debugView.AppendFlags(FarseerPhysics.DebugViewFlags.CenterOfMass);
     //debugView.AppendFlags(FarseerPhysics.DebugViewFlags.PerformanceGraph);
     debugView.AppendFlags(FarseerPhysics.DebugViewFlags.DebugPanel);
 }
Esempio n. 3
0
 // Use this for initialization
 void Start()
 {
     cam = GetComponent <Camera>();
     if (cam == null)
     {
         return;
     }
     projection = cam.projectionMatrix;
     debugView  = new FarseerDebugViewUnity(FSWorldComponent.PhysicsWorld);
     debugView.AppendFlags(FarseerPhysics.DebugViewFlags.ContactPoints);
     //debugView.AppendFlags(FarseerPhysics.DebugViewFlags.ContactNormals);
     debugView.AppendFlags(FarseerPhysics.DebugViewFlags.CenterOfMass);
     //debugView.AppendFlags(FarseerPhysics.DebugViewFlags.PerformanceGraph);
     debugView.AppendFlags(FarseerPhysics.DebugViewFlags.DebugPanel);
 }