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

Method setPosition

core/physics/PhysicsBody.cpp:391–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389}
390
391void PhysicsBody::setPosition(float positionX, float positionY)
392{
393 cpVect tt;
394
395 tt.x = positionX + _positionOffset.x;
396 tt.y = positionY + _positionOffset.y;
397
398 cpBodySetPosition(_cpBody, tt);
399}
400
401Vec2 PhysicsBody::getPosition() const
402{

Callers 2

afterSimulationMethod · 0.45
createConstraintsMethod · 0.45

Calls 1

cpBodySetPositionFunction · 0.85

Tested by

no test coverage detected