PhysicsCollider
Class
Index
Properties
density
Number
The density.sensor
Boolean
A sensor collider collects contact information but never generates a collision responsefriction
Number
The friction coefficient, usually in the range [0,1].restitution
Number
The restitution (elasticity) usually in the range [0,1].body
RigidBody
Physics collider will find the rigidbody component on the node and set to this property.
Methods
apply
Apply current changes to collider, this will regenerate inner box2d fixtures.getAABB
Get the world aabb of the collider
Details
Properties
density
The density.
meta | description |
---|---|
Type | Number |
Defined in | cocos2d/core/physics/collider/CCPhysicsCollider.js:53 |
sensor
A sensor collider collects contact information but never generates a collision response
meta | description |
---|---|
Type | Boolean |
Defined in | cocos2d/core/physics/collider/CCPhysicsCollider.js:71 |
friction
The friction coefficient, usually in the range [0,1].
meta | description |
---|---|
Type | Number |
Defined in | cocos2d/core/physics/collider/CCPhysicsCollider.js:89 |
restitution
The restitution (elasticity) usually in the range [0,1].
meta | description |
---|---|
Type | Number |
Defined in | cocos2d/core/physics/collider/CCPhysicsCollider.js:107 |
body
Physics collider will find the rigidbody component on the node and set to this property.
meta | description |
---|---|
Type | RigidBody |
Defined in | cocos2d/core/physics/collider/CCPhysicsCollider.js:125 |
Methods
apply
Apply current changes to collider, this will regenerate inner box2d fixtures.
meta | description |
---|---|
Defined in | cocos2d/core/physics/collider/CCPhysicsCollider.js:257 |
getAABB
Get the world aabb of the collider
meta | description |
---|---|
Defined in | cocos2d/core/physics/collider/CCPhysicsCollider.js:269 |