Пример #1
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);
	}
Пример #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);
 }
Пример #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);
 }