MCPcopy Create free account
hub / github.com/axmolengine/axmol / fixedUpdate

Method fixedUpdate

core/physics/PhysicsBody.cpp:810–818  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

808}
809
810void 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
820void PhysicsBody::setCategoryBitmask(int bitmask)
821{

Callers 1

updateMethod · 0.45

Calls 1

cpfclampFunction · 0.85

Tested by

no test coverage detected