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

Method onGround

source/game/StarActorMovementController.cpp:1469–1477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1467}
1468
1469bool PathController::onGround(ActorMovementController const& movementController, Vec2F const& position, CollisionSet const& collisionSet) const {
1470 auto bounds = RectI::integral(movementController.localBoundBox().translated(position));
1471 Vec2I min = Vec2I(bounds.xMin(), bounds.yMin() - 1);
1472 Vec2I max = Vec2I(bounds.xMax(), bounds.yMin());
1473 // for (auto line : RectF(Vec2F(min), Vec2F(max)).edges()) {
1474 // SpatialLogger::logLine("world", line, m_world->rectTileCollision(RectI(min, max), collisionSet) ? Color::Blue.toRgba() : Color::Red.toRgba());
1475 // }
1476 return m_world->rectTileCollision(RectI(min, max), collisionSet);
1477}
1478
1479}

Callers 1

findPathMethod · 0.45

Calls 6

xMinMethod · 0.80
yMinMethod · 0.80
xMaxMethod · 0.80
translatedMethod · 0.45
localBoundBoxMethod · 0.45
rectTileCollisionMethod · 0.45

Tested by

no test coverage detected