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

Method getRotation

core/physics/PhysicsBody.cpp:417–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415}
416
417float PhysicsBody::getRotation()
418{
419 if (_recordedAngle != cpBodyGetAngle(_cpBody))
420 {
421 _recordedAngle = cpBodyGetAngle(_cpBody);
422 _recordedRotation = -_recordedAngle * 180.0 / M_PI - _rotationOffset;
423 }
424 return _recordedRotation;
425}
426
427PhysicsShape* PhysicsBody::addShape(PhysicsShape* shape, bool addMassAndMoment /* = true*/)
428{

Callers 6

onAddMethod · 0.45
createConstraintsMethod · 0.45
beforeSimulationMethod · 0.45
afterSimulationMethod · 0.45
getCurrentOrientationMethod · 0.45
onSensorChangedMethod · 0.45

Calls 1

cpBodyGetAngleFunction · 0.85

Tested by

no test coverage detected