MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / getAbsolutePosition

Method getAbsolutePosition

source/game/StarMonster.cpp:540–546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

538}
539
540Vec2F Monster::getAbsolutePosition(Vec2F relativePosition) const {
541 if (m_movementController->facingDirection() == Direction::Left)
542 relativePosition[0] *= -1;
543 if (m_movementController->rotation() != 0)
544 relativePosition = relativePosition.rotate(m_movementController->rotation());
545 return m_movementController->position() + relativePosition;
546}
547
548void Monster::updateStatus(float dt) {
549 m_effectEmitter.setSourcePosition("normal", position());

Callers

nothing calls this directly

Calls 4

facingDirectionMethod · 0.45
rotationMethod · 0.45
rotateMethod · 0.45
positionMethod · 0.45

Tested by

no test coverage detected