Fill (Bill man) Personal originality. You are welcome to repost it. Please specify the address for reprinting (Bill man) Column addressHttp://blog.csdn.net/bill_man
This example, like its name, mainly creates a gear joint. The effect is as follows:
First, insert a content. Here we provide a method to create other types of shapes. The method is as follows:
The above are the methods for creating circles and polygon and using these shapes to create objects.
In theory, complex shapes can be used to simulate the gear joints, but this is not efficient.Box2dProvidedGear joint. Similar to the pulley coefficient, you can specify a gear coefficient (ratio), and the gear coefficient can be negative. It is also worth noting that when one is a rotating joint (angular) and the other is a moving joint (PAN), the gear coefficient is one of the length or length points. It should be noted that the gear joint should always be removed before rotation or moving the joint, otherwise yourCodeIt will crash due to invalid joint pointer in the gear joint. In addition, the gear joint should be deleted before any related objects are deleted. The following describes how to define the gear joints.
If there are any errors, I hope you can correct them more.
Next articleCantileverExample