| 1467 | } |
| 1468 | |
| 1469 | bool 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 | } |
no test coverage detected