PhysicsCircleCollider Class
Extends PhysicsCollider, Collider.Circle(mixin)
Index
Properties
- offset- Vec2Position offset
- radius- NumberCircle radius
- density- NumberThe density.
- sensor- BooleanA sensor collider collects contact information but never generates a collision response
- friction- NumberThe friction coefficient, usually in the range [0,1].
- restitution- NumberThe restitution (elasticity) usually in the range [0,1].
- body- RigidBodyPhysics collider will find the rigidbody component on the node and set to this property.
Methods
- applyApply current changes to collider, this will regenerate inner box2d fixtures.
- getAABBGet the world aabb of the collider
Details
Properties
offset
Position offset
| meta | description | 
|---|---|
| Type | Vec2 | 
| Defined in | cocos2d/core/collider/CCCircleCollider.js:40 | 
radius
Circle radius
| meta | description | 
|---|---|
| Type | Number | 
| Defined in | cocos2d/core/collider/CCCircleCollider.js:56 | 
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 | 
