change to physics based ship movement
This commit is contained in:
@@ -810,10 +810,7 @@ void GameWorldView::drawShips(QPainter& painter)
|
||||
if (it == m_visuals->ships.end()) { continue; }
|
||||
|
||||
const QPointF center = worldToWidget(ship.position);
|
||||
const QVector2D vel = ship.velocity;
|
||||
const QVector2D dir = (vel.length() > 0.0001f)
|
||||
? vel.normalized()
|
||||
: QVector2D(1.0f, 0.0f);
|
||||
const QVector2D dir(std::cos(ship.facing), std::sin(ship.facing));
|
||||
const QVector2D perp(-dir.y(), dir.x());
|
||||
|
||||
const float fwd = tilePx() * 0.45f;
|
||||
|
||||
Reference in New Issue
Block a user