| 808 | } |
| 809 | |
| 810 | void PhysicsBody::fixedUpdate(float delta) |
| 811 | { |
| 812 | if (_fixedUpdate && _isDamping && _dynamic && !isResting()) |
| 813 | { |
| 814 | _cpBody->v.x *= cpfclamp(1.0f - delta * _linearDamping, 0.0f, 1.0f); |
| 815 | _cpBody->v.y *= cpfclamp(1.0f - delta * _linearDamping, 0.0f, 1.0f); |
| 816 | _cpBody->w *= cpfclamp(1.0f - delta * _angularDamping, 0.0f, 1.0f); |
| 817 | } |
| 818 | } |
| 819 | |
| 820 | void PhysicsBody::setCategoryBitmask(int bitmask) |
| 821 | { |