diff --git a/projectile.go b/projectile.go index 174844b..0321406 100644 --- a/projectile.go +++ b/projectile.go @@ -28,7 +28,7 @@ func (p *Projectile) Tick(g *game) { continue } - player_rect := v.RectFromPoint(r.Position, 3) + player_rect := v.AASquareAtPoint(r.Position, 3) collision, _, _ := v.RectIntersection(player_rect, p.Position, v_scaled) if collision { hit_player = true @@ -45,7 +45,7 @@ func (p *Projectile) Tick(g *game) { } // Are we going to intersect the destination zone in this tick? - r_dest := v.RectFromPoint(p.MoveTo, 3.0) + r_dest := v.AASquareAtPoint(p.MoveTo, 3.0) travel := newPos.Sub(p.Position) arrived, _, pos := v.RectIntersection(r_dest, p.Position, travel)