fix a lot of issues, add gyroscopic force integrator, add contact polygon winding, add some quaternion constraints, add more tests
This commit is contained in:
		| @@ -46,8 +46,15 @@ public: | ||||
| 			body->CreateShape(sd); | ||||
| 		} | ||||
|  | ||||
| 		b3Vec3 boxScale; | ||||
| 		boxScale.Set(1.0f, 0.5f, 3.0f); | ||||
| 		b3Vec3 boxScale(1.0f, 0.5f, 3.0f); | ||||
|  | ||||
| 		static b3BoxHull boxHull; | ||||
|  | ||||
| 		b3Transform m; | ||||
| 		m.rotation = b3Diagonal(boxScale.x, boxScale.y, boxScale.z); | ||||
| 		m.position.SetZero(); | ||||
|  | ||||
| 		boxHull.SetTransform(m); | ||||
|  | ||||
| 		float32 y = 2.0f; | ||||
|  | ||||
| @@ -65,12 +72,12 @@ public: | ||||
| 				b3Body* body = m_world.CreateBody(bd); | ||||
|  | ||||
| 				b3HullShape hs; | ||||
| 				hs.m_hull = &m_plankHull; | ||||
| 				hs.m_hull = &boxHull; | ||||
|  | ||||
| 				b3ShapeDef sd; | ||||
| 				sd.shape = &hs; | ||||
| 				sd.density = 0.1f; | ||||
| 				sd.friction = 0.1f; | ||||
| 				sd.friction = 0.3f; | ||||
|  | ||||
| 				body->CreateShape(sd); | ||||
| 			} | ||||
| @@ -91,7 +98,7 @@ public: | ||||
| 				b3Body* body = m_world.CreateBody(bd); | ||||
|  | ||||
| 				b3HullShape hs; | ||||
| 				hs.m_hull = &m_plankHull; | ||||
| 				hs.m_hull = &boxHull; | ||||
|  | ||||
| 				b3ShapeDef sd; | ||||
| 				sd.shape = &hs; | ||||
| @@ -111,4 +118,4 @@ public: | ||||
| 	} | ||||
| }; | ||||
|  | ||||
| #endif | ||||
| #endif | ||||
		Reference in New Issue
	
	Block a user