MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / getVelocity

Method getVelocity

Source/Physics/Body.cpp:150–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150Vec2 Body::getVelocity() const {
151 AssertUnless(_pWorld && _pWorld->getPrWorld() && pr::IsValid(_prBody), "got invalid physics state.");
152 auto& world = *_pWorld->getPrWorld();
153 return PhysicsWorld::Val(pd::GetVelocity(world, _prBody).linear);
154}
155
156void Body::setAngularRate(float var) {
157 AssertUnless(_pWorld && _pWorld->getPrWorld() && pr::IsValid(_prBody), "got invalid physics state.");

Callers 3

initMethod · 0.80
body_get_velocityFunction · 0.80

Calls 4

ValFunction · 0.85
getPrWorldMethod · 0.80
IsValidFunction · 0.50
GetVelocityFunction · 0.50

Tested by

no test coverage detected