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

Method getVelocityX

Source/Physics/Body.cpp:283–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283float Body::getVelocityX() const {
284 AssertUnless(_pWorld && _pWorld->getPrWorld() && pr::IsValid(_prBody), "got invalid physics state.");
285 auto& world = *_pWorld->getPrWorld();
286 return PhysicsWorld::Val(pd::GetVelocity(world, _prBody).linear[0]);
287}
288
289void Body::setVelocityY(float y) {
290 AssertUnless(_pWorld && _pWorld->getPrWorld() && pr::IsValid(_prBody), "got invalid physics state.");

Callers 2

onHitTargetMethod · 0.80
body_get_velocity_xFunction · 0.80

Calls 4

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

Tested by

no test coverage detected