1: Open three steps and a physics engine pit:
(1) open Engine: cc.director.getPhysicsManager () enabled = true.
(2) Configuration Gravity:. Cc.director.getPhysicsManager () gravity = this.gravity
(3) controlled by debug mode switch is turned on:
Open physics engine script code, which must be written onLoad function, or can not open, remember, remember;
2: Editing physical shape and physical node
(1) a node is created, as a carrier;
(2) adding component instance a rigid body, the rigid type configuration, static, dynamic;
(3) adding a physical shape to the object, i.e. Collider, called impactor;
Support impactor rectangular, circular, polygonal, any shape can do it. A node can have multiple shapes.
3: Collision Detection
Collision detection is the physics engine which was commonly used functions, in fact, very simple, that node to obtain inspection car collision, as long as the node, hanging script instance, and then reload the physical collision monitoring function can be obtained,