mortar + mini gun cannot hit weak points
This commit is contained in:
parent
f73f093ae2
commit
045faf2333
10 changed files with 77 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ func _ready() -> void:
|
|||
|
||||
func hit(projectile: PlayerProjectile, _damage: float) -> bool:
|
||||
if projectile == null: return false
|
||||
if not projectile.can_hit_weak_points: return false
|
||||
|
||||
var angle := projectile.velocity.angle_to(-parent.velocity)
|
||||
var weak_point_hit := rad_to_deg(angle) < 25.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue